chillerlan-QRCode-Common-EccLevel.html 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. EccLevel
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">20</span>
  100. </aside>
  101. <p class="phpdocumentor-summary">This class encapsulates the four error correction levels defined by the QR code standard.</p>
  102. <h3 id="toc">
  103. Table of Contents
  104. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  105. </h3>
  106. <dl class="phpdocumentor-table-of-contents">
  107. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  108. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_H">H</a>
  109. <span>
  110. &nbsp;= 0b10 </span>
  111. </dt>
  112. <dd></dd>
  113. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  114. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_L">L</a>
  115. <span>
  116. &nbsp;= 0b1 </span>
  117. </dt>
  118. <dd></dd>
  119. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  120. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_M">M</a>
  121. <span>
  122. &nbsp;= 0b0 </span>
  123. </dt>
  124. <dd></dd>
  125. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  126. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_Q">Q</a>
  127. <span>
  128. &nbsp;= 0b11 </span>
  129. </dt>
  130. <dd></dd>
  131. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  132. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_FORMAT_PATTERN">FORMAT_PATTERN</a>
  133. <span>
  134. &nbsp;= [[
  135. // L
  136. 0b111011111000100,
  137. 0b111001011110011,
  138. 0b111110110101010,
  139. 0b111100010011101,
  140. 0b110011000101111,
  141. 0b110001100011000,
  142. 0b110110001000001,
  143. 0b110100101110110,
  144. ], [
  145. // M
  146. 0b101010000010010,
  147. 0b101000100100101,
  148. 0b101111001111100,
  149. 0b101101101001011,
  150. 0b100010111111001,
  151. 0b100000011001110,
  152. 0b100111110010111,
  153. 0b100101010100000,
  154. ], [
  155. // Q
  156. 0b11010101011111,
  157. 0b11000001101000,
  158. 0b11111100110001,
  159. 0b11101000000110,
  160. 0b10010010110100,
  161. 0b10000110000011,
  162. 0b10111011011010,
  163. 0b10101111101101,
  164. ], [
  165. // H
  166. 0b1011010001001,
  167. 0b1001110111110,
  168. 0b1110011100111,
  169. 0b1100111010000,
  170. 0b11101100010,
  171. 0b1001010101,
  172. 0b110100001100,
  173. 0b100000111011,
  174. ]] </span>
  175. </dt>
  176. <dd>ISO/IEC 18004:2000 Section 8.9 - Format Information</dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  178. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_MAX_BITS">MAX_BITS</a>
  179. <span>
  180. &nbsp;= [
  181. // v =&gt; [ L, M, Q, H] // modules
  182. 1 =&gt; [152, 128, 104, 72],
  183. // 21
  184. 2 =&gt; [272, 224, 176, 128],
  185. // 25
  186. 3 =&gt; [440, 352, 272, 208],
  187. // 29
  188. 4 =&gt; [640, 512, 384, 288],
  189. // 33
  190. 5 =&gt; [864, 688, 496, 368],
  191. // 37
  192. 6 =&gt; [1088, 864, 608, 480],
  193. // 41
  194. 7 =&gt; [1248, 992, 704, 528],
  195. // 45
  196. 8 =&gt; [1552, 1232, 880, 688],
  197. // 49
  198. 9 =&gt; [1856, 1456, 1056, 800],
  199. // 53
  200. 10 =&gt; [2192, 1728, 1232, 976],
  201. // 57
  202. 11 =&gt; [2592, 2032, 1440, 1120],
  203. // 61
  204. 12 =&gt; [2960, 2320, 1648, 1264],
  205. // 65
  206. 13 =&gt; [3424, 2672, 1952, 1440],
  207. // 69 NICE!
  208. 14 =&gt; [3688, 2920, 2088, 1576],
  209. // 73
  210. 15 =&gt; [4184, 3320, 2360, 1784],
  211. // 77
  212. 16 =&gt; [4712, 3624, 2600, 2024],
  213. // 81
  214. 17 =&gt; [5176, 4056, 2936, 2264],
  215. // 85
  216. 18 =&gt; [5768, 4504, 3176, 2504],
  217. // 89
  218. 19 =&gt; [6360, 5016, 3560, 2728],
  219. // 93
  220. 20 =&gt; [6888, 5352, 3880, 3080],
  221. // 97
  222. 21 =&gt; [7456, 5712, 4096, 3248],
  223. // 101
  224. 22 =&gt; [8048, 6256, 4544, 3536],
  225. // 105
  226. 23 =&gt; [8752, 6880, 4912, 3712],
  227. // 109
  228. 24 =&gt; [9392, 7312, 5312, 4112],
  229. // 113
  230. 25 =&gt; [10208, 8000, 5744, 4304],
  231. // 117
  232. 26 =&gt; [10960, 8496, 6032, 4768],
  233. // 121
  234. 27 =&gt; [11744, 9024, 6464, 5024],
  235. // 125
  236. 28 =&gt; [12248, 9544, 6968, 5288],
  237. // 129
  238. 29 =&gt; [13048, 10136, 7288, 5608],
  239. // 133
  240. 30 =&gt; [13880, 10984, 7880, 5960],
  241. // 137
  242. 31 =&gt; [14744, 11640, 8264, 6344],
  243. // 141
  244. 32 =&gt; [15640, 12328, 8920, 6760],
  245. // 145
  246. 33 =&gt; [16568, 13048, 9368, 7208],
  247. // 149
  248. 34 =&gt; [17528, 13800, 9848, 7688],
  249. // 153
  250. 35 =&gt; [18448, 14496, 10288, 7888],
  251. // 157
  252. 36 =&gt; [19472, 15312, 10832, 8432],
  253. // 161
  254. 37 =&gt; [20528, 15936, 11408, 8768],
  255. // 165
  256. 38 =&gt; [21616, 16816, 12016, 9136],
  257. // 169
  258. 39 =&gt; [22496, 17728, 12656, 9776],
  259. // 173
  260. 40 =&gt; [23648, 18672, 13328, 10208],
  261. ] </span>
  262. </dt>
  263. <dd>ISO/IEC 18004:2000 Tables 7-11 - Number of symbol characters and input data capacity for versions 1 to 40</dd>
  264. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  265. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#property_eccLevel">$eccLevel</a>
  266. <span>
  267. &nbsp;: int </span>
  268. </dt>
  269. <dd>The current ECC level value</dd>
  270. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  271. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___construct">__construct()</a>
  272. <span>
  273. &nbsp;: mixed </span>
  274. </dt>
  275. <dd></dd>
  276. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  277. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___toString">__toString()</a>
  278. <span>
  279. &nbsp;: string </span>
  280. </dt>
  281. <dd>returns the string representation of the current ECC level</dd>
  282. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  283. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getformatPattern">getformatPattern()</a>
  284. <span>
  285. &nbsp;: int </span>
  286. </dt>
  287. <dd>returns the format pattern for the given $eccLevel and $maskPattern</dd>
  288. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  289. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getLevel">getLevel()</a>
  290. <span>
  291. &nbsp;: int </span>
  292. </dt>
  293. <dd>returns the current ECC level</dd>
  294. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  295. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getMaxBits">getMaxBits()</a>
  296. <span>
  297. &nbsp;: array&lt;string|int, int&gt; </span>
  298. </dt>
  299. <dd>returns an array with the max bit lengths for version 1-40 and the current ECC level</dd>
  300. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  301. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getOrdinal">getOrdinal()</a>
  302. <span>
  303. &nbsp;: int </span>
  304. </dt>
  305. <dd>returns the ordinal value of the current ECC level</dd>
  306. </dl>
  307. <section class="phpdocumentor-constants">
  308. <h3 class="phpdocumentor-elements__header" id="constants">
  309. Constants
  310. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  311. </h3>
  312. <article class="phpdocumentor-element -constant -public ">
  313. <h4 class="phpdocumentor-element__name" id="constant_H">
  314. H
  315. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_H" class="headerlink"><i class="fas fa-link"></i></a>
  316. </h4>
  317. <aside class="phpdocumentor-element-found-in">
  318. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  319. :
  320. <span class="phpdocumentor-element-found-in__line">31</span>
  321. </aside>
  322. <code class="phpdocumentor-signature phpdocumentor-code ">
  323. <span class="phpdocumentor-signature__visibility">public</span>
  324. <span class="phpdocumentor-signature__type">int</span>
  325. <span class="phpdocumentor-signature__name">H</span>
  326. = <span class="phpdocumentor-signature__default-value">0b10</span>
  327. </code>
  328. </article>
  329. <article class="phpdocumentor-element -constant -public ">
  330. <h4 class="phpdocumentor-element__name" id="constant_L">
  331. L
  332. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_L" class="headerlink"><i class="fas fa-link"></i></a>
  333. </h4>
  334. <aside class="phpdocumentor-element-found-in">
  335. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  336. :
  337. <span class="phpdocumentor-element-found-in__line">25</span>
  338. </aside>
  339. <code class="phpdocumentor-signature phpdocumentor-code ">
  340. <span class="phpdocumentor-signature__visibility">public</span>
  341. <span class="phpdocumentor-signature__type">int</span>
  342. <span class="phpdocumentor-signature__name">L</span>
  343. = <span class="phpdocumentor-signature__default-value">0b1</span>
  344. </code>
  345. </article>
  346. <article class="phpdocumentor-element -constant -public ">
  347. <h4 class="phpdocumentor-element__name" id="constant_M">
  348. M
  349. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_M" class="headerlink"><i class="fas fa-link"></i></a>
  350. </h4>
  351. <aside class="phpdocumentor-element-found-in">
  352. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  353. :
  354. <span class="phpdocumentor-element-found-in__line">27</span>
  355. </aside>
  356. <code class="phpdocumentor-signature phpdocumentor-code ">
  357. <span class="phpdocumentor-signature__visibility">public</span>
  358. <span class="phpdocumentor-signature__type">int</span>
  359. <span class="phpdocumentor-signature__name">M</span>
  360. = <span class="phpdocumentor-signature__default-value">0b0</span>
  361. </code>
  362. </article>
  363. <article class="phpdocumentor-element -constant -public ">
  364. <h4 class="phpdocumentor-element__name" id="constant_Q">
  365. Q
  366. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_Q" class="headerlink"><i class="fas fa-link"></i></a>
  367. </h4>
  368. <aside class="phpdocumentor-element-found-in">
  369. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  370. :
  371. <span class="phpdocumentor-element-found-in__line">29</span>
  372. </aside>
  373. <code class="phpdocumentor-signature phpdocumentor-code ">
  374. <span class="phpdocumentor-signature__visibility">public</span>
  375. <span class="phpdocumentor-signature__type">int</span>
  376. <span class="phpdocumentor-signature__name">Q</span>
  377. = <span class="phpdocumentor-signature__default-value">0b11</span>
  378. </code>
  379. </article>
  380. <article class="phpdocumentor-element -constant -private ">
  381. <h4 class="phpdocumentor-element__name" id="constant_FORMAT_PATTERN">
  382. FORMAT_PATTERN
  383. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_FORMAT_PATTERN" class="headerlink"><i class="fas fa-link"></i></a>
  384. </h4>
  385. <aside class="phpdocumentor-element-found-in">
  386. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  387. :
  388. <span class="phpdocumentor-element-found-in__line">89</span>
  389. </aside>
  390. <p class="phpdocumentor-summary">ISO/IEC 18004:2000 Section 8.9 - Format Information</p>
  391. <code class="phpdocumentor-signature phpdocumentor-code ">
  392. <span class="phpdocumentor-signature__visibility">private</span>
  393. <span class="phpdocumentor-signature__type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span>
  394. <span class="phpdocumentor-signature__name">FORMAT_PATTERN</span>
  395. = <span class="phpdocumentor-signature__default-value">[[
  396. // L
  397. 0b111011111000100,
  398. 0b111001011110011,
  399. 0b111110110101010,
  400. 0b111100010011101,
  401. 0b110011000101111,
  402. 0b110001100011000,
  403. 0b110110001000001,
  404. 0b110100101110110,
  405. ], [
  406. // M
  407. 0b101010000010010,
  408. 0b101000100100101,
  409. 0b101111001111100,
  410. 0b101101101001011,
  411. 0b100010111111001,
  412. 0b100000011001110,
  413. 0b100111110010111,
  414. 0b100101010100000,
  415. ], [
  416. // Q
  417. 0b11010101011111,
  418. 0b11000001101000,
  419. 0b11111100110001,
  420. 0b11101000000110,
  421. 0b10010010110100,
  422. 0b10000110000011,
  423. 0b10111011011010,
  424. 0b10101111101101,
  425. ], [
  426. // H
  427. 0b1011010001001,
  428. 0b1001110111110,
  429. 0b1110011100111,
  430. 0b1100111010000,
  431. 0b11101100010,
  432. 0b1001010101,
  433. 0b110100001100,
  434. 0b100000111011,
  435. ]]</span>
  436. </code>
  437. <section class="phpdocumentor-description"><p>ECC level -&gt; mask pattern</p>
  438. </section>
  439. </article>
  440. <article class="phpdocumentor-element -constant -private ">
  441. <h4 class="phpdocumentor-element__name" id="constant_MAX_BITS">
  442. MAX_BITS
  443. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_MAX_BITS" class="headerlink"><i class="fas fa-link"></i></a>
  444. </h4>
  445. <aside class="phpdocumentor-element-found-in">
  446. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  447. :
  448. <span class="phpdocumentor-element-found-in__line">38</span>
  449. </aside>
  450. <p class="phpdocumentor-summary">ISO/IEC 18004:2000 Tables 7-11 - Number of symbol characters and input data capacity for versions 1 to 40</p>
  451. <code class="phpdocumentor-signature phpdocumentor-code ">
  452. <span class="phpdocumentor-signature__visibility">private</span>
  453. <span class="phpdocumentor-signature__type">int</span>
  454. <span class="phpdocumentor-signature__name">MAX_BITS</span>
  455. = <span class="phpdocumentor-signature__default-value">[
  456. // v =&gt; [ L, M, Q, H] // modules
  457. 1 =&gt; [152, 128, 104, 72],
  458. // 21
  459. 2 =&gt; [272, 224, 176, 128],
  460. // 25
  461. 3 =&gt; [440, 352, 272, 208],
  462. // 29
  463. 4 =&gt; [640, 512, 384, 288],
  464. // 33
  465. 5 =&gt; [864, 688, 496, 368],
  466. // 37
  467. 6 =&gt; [1088, 864, 608, 480],
  468. // 41
  469. 7 =&gt; [1248, 992, 704, 528],
  470. // 45
  471. 8 =&gt; [1552, 1232, 880, 688],
  472. // 49
  473. 9 =&gt; [1856, 1456, 1056, 800],
  474. // 53
  475. 10 =&gt; [2192, 1728, 1232, 976],
  476. // 57
  477. 11 =&gt; [2592, 2032, 1440, 1120],
  478. // 61
  479. 12 =&gt; [2960, 2320, 1648, 1264],
  480. // 65
  481. 13 =&gt; [3424, 2672, 1952, 1440],
  482. // 69 NICE!
  483. 14 =&gt; [3688, 2920, 2088, 1576],
  484. // 73
  485. 15 =&gt; [4184, 3320, 2360, 1784],
  486. // 77
  487. 16 =&gt; [4712, 3624, 2600, 2024],
  488. // 81
  489. 17 =&gt; [5176, 4056, 2936, 2264],
  490. // 85
  491. 18 =&gt; [5768, 4504, 3176, 2504],
  492. // 89
  493. 19 =&gt; [6360, 5016, 3560, 2728],
  494. // 93
  495. 20 =&gt; [6888, 5352, 3880, 3080],
  496. // 97
  497. 21 =&gt; [7456, 5712, 4096, 3248],
  498. // 101
  499. 22 =&gt; [8048, 6256, 4544, 3536],
  500. // 105
  501. 23 =&gt; [8752, 6880, 4912, 3712],
  502. // 109
  503. 24 =&gt; [9392, 7312, 5312, 4112],
  504. // 113
  505. 25 =&gt; [10208, 8000, 5744, 4304],
  506. // 117
  507. 26 =&gt; [10960, 8496, 6032, 4768],
  508. // 121
  509. 27 =&gt; [11744, 9024, 6464, 5024],
  510. // 125
  511. 28 =&gt; [12248, 9544, 6968, 5288],
  512. // 129
  513. 29 =&gt; [13048, 10136, 7288, 5608],
  514. // 133
  515. 30 =&gt; [13880, 10984, 7880, 5960],
  516. // 137
  517. 31 =&gt; [14744, 11640, 8264, 6344],
  518. // 141
  519. 32 =&gt; [15640, 12328, 8920, 6760],
  520. // 145
  521. 33 =&gt; [16568, 13048, 9368, 7208],
  522. // 149
  523. 34 =&gt; [17528, 13800, 9848, 7688],
  524. // 153
  525. 35 =&gt; [18448, 14496, 10288, 7888],
  526. // 157
  527. 36 =&gt; [19472, 15312, 10832, 8432],
  528. // 161
  529. 37 =&gt; [20528, 15936, 11408, 8768],
  530. // 165
  531. 38 =&gt; [21616, 16816, 12016, 9136],
  532. // 169
  533. 39 =&gt; [22496, 17728, 12656, 9776],
  534. // 173
  535. 40 =&gt; [23648, 18672, 13328, 10208],
  536. ]</span>
  537. </code>
  538. <section class="phpdocumentor-description"><p>[][]</p>
  539. </section>
  540. </article>
  541. </section>
  542. <section class="phpdocumentor-properties">
  543. <h3 class="phpdocumentor-elements__header" id="properties">
  544. Properties
  545. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  546. </h3>
  547. <article
  548. class="
  549. phpdocumentor-element
  550. -property
  551. -private
  552. "
  553. >
  554. <h4 class="phpdocumentor-element__name" id="property_eccLevel">
  555. $eccLevel
  556. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#property_eccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  557. <span class="phpdocumentor-element__modifiers">
  558. </span>
  559. </h4>
  560. <aside class="phpdocumentor-element-found-in">
  561. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  562. :
  563. <span class="phpdocumentor-element-found-in__line">140</span>
  564. </aside>
  565. <p class="phpdocumentor-summary">The current ECC level value</p>
  566. <code class="phpdocumentor-code phpdocumentor-signature ">
  567. <span class="phpdocumentor-signature__visibility">private</span>
  568. <span class="phpdocumentor-signature__type">int</span>
  569. <span class="phpdocumentor-signature__name">$eccLevel</span>
  570. </code>
  571. <section class="phpdocumentor-description"><p>L: 0b01
  572. M: 0b00
  573. Q: 0b11
  574. H: 0b10</p>
  575. </section>
  576. <section class="phpdocumentor-description"></section>
  577. </article>
  578. </section>
  579. <section class="phpdocumentor-methods">
  580. <h3 class="phpdocumentor-elements__header" id="methods">
  581. Methods
  582. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  583. </h3>
  584. <article
  585. class="phpdocumentor-element
  586. -method
  587. -public
  588. "
  589. >
  590. <h4 class="phpdocumentor-element__name" id="method___construct">
  591. __construct()
  592. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  593. </h4>
  594. <aside class="phpdocumentor-element-found-in">
  595. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  596. :
  597. <span class="phpdocumentor-element-found-in__line">147</span>
  598. </aside>
  599. <code class="phpdocumentor-code phpdocumentor-signature ">
  600. <span class="phpdocumentor-signature__visibility">public</span>
  601. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$eccLevel</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  602. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  603. <dl class="phpdocumentor-argument-list">
  604. <dt class="phpdocumentor-argument-list__entry">
  605. <span class="phpdocumentor-signature__argument__name">$eccLevel</span>
  606. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  607. </dt>
  608. <dd class="phpdocumentor-argument-list__definition">
  609. <section class="phpdocumentor-description"><p>containing the two bits encoding a QR Code's error correction level</p>
  610. </section>
  611. </dd>
  612. </dl>
  613. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  614. Tags
  615. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  616. </h5>
  617. <dl class="phpdocumentor-tag-list">
  618. <dt class="phpdocumentor-tag-list__entry">
  619. <span class="phpdocumentor-tag__name">throws</span>
  620. </dt>
  621. <dd class="phpdocumentor-tag-list__definition">
  622. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  623. </dd>
  624. </dl>
  625. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  626. <span class="phpdocumentor-signature__response_type">mixed</span>
  627. &mdash;
  628. </article>
  629. <article
  630. class="phpdocumentor-element
  631. -method
  632. -public
  633. "
  634. >
  635. <h4 class="phpdocumentor-element__name" id="method___toString">
  636. __toString()
  637. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___toString" class="headerlink"><i class="fas fa-link"></i></a>
  638. </h4>
  639. <aside class="phpdocumentor-element-found-in">
  640. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  641. :
  642. <span class="phpdocumentor-element-found-in__line">159</span>
  643. </aside>
  644. <p class="phpdocumentor-summary">returns the string representation of the current ECC level</p>
  645. <code class="phpdocumentor-code phpdocumentor-signature ">
  646. <span class="phpdocumentor-signature__visibility">public</span>
  647. <span class="phpdocumentor-signature__name">__toString</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  648. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  649. <span class="phpdocumentor-signature__response_type">string</span>
  650. &mdash;
  651. </article>
  652. <article
  653. class="phpdocumentor-element
  654. -method
  655. -public
  656. "
  657. >
  658. <h4 class="phpdocumentor-element__name" id="method_getformatPattern">
  659. getformatPattern()
  660. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getformatPattern" class="headerlink"><i class="fas fa-link"></i></a>
  661. </h4>
  662. <aside class="phpdocumentor-element-found-in">
  663. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  664. :
  665. <span class="phpdocumentor-element-found-in__line">196</span>
  666. </aside>
  667. <p class="phpdocumentor-summary">returns the format pattern for the given $eccLevel and $maskPattern</p>
  668. <code class="phpdocumentor-code phpdocumentor-signature ">
  669. <span class="phpdocumentor-signature__visibility">public</span>
  670. <span class="phpdocumentor-signature__name">getformatPattern</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$maskPattern</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  671. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  672. <dl class="phpdocumentor-argument-list">
  673. <dt class="phpdocumentor-argument-list__entry">
  674. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  675. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a></span>
  676. </dt>
  677. <dd class="phpdocumentor-argument-list__definition">
  678. <section class="phpdocumentor-description"></section>
  679. </dd>
  680. </dl>
  681. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  682. <span class="phpdocumentor-signature__response_type">int</span>
  683. &mdash;
  684. </article>
  685. <article
  686. class="phpdocumentor-element
  687. -method
  688. -public
  689. "
  690. >
  691. <h4 class="phpdocumentor-element__name" id="method_getLevel">
  692. getLevel()
  693. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getLevel" class="headerlink"><i class="fas fa-link"></i></a>
  694. </h4>
  695. <aside class="phpdocumentor-element-found-in">
  696. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  697. :
  698. <span class="phpdocumentor-element-found-in__line">171</span>
  699. </aside>
  700. <p class="phpdocumentor-summary">returns the current ECC level</p>
  701. <code class="phpdocumentor-code phpdocumentor-signature ">
  702. <span class="phpdocumentor-signature__visibility">public</span>
  703. <span class="phpdocumentor-signature__name">getLevel</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  704. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  705. <span class="phpdocumentor-signature__response_type">int</span>
  706. &mdash;
  707. </article>
  708. <article
  709. class="phpdocumentor-element
  710. -method
  711. -public
  712. "
  713. >
  714. <h4 class="phpdocumentor-element__name" id="method_getMaxBits">
  715. getMaxBits()
  716. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getMaxBits" class="headerlink"><i class="fas fa-link"></i></a>
  717. </h4>
  718. <aside class="phpdocumentor-element-found-in">
  719. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  720. :
  721. <span class="phpdocumentor-element-found-in__line">205</span>
  722. </aside>
  723. <p class="phpdocumentor-summary">returns an array with the max bit lengths for version 1-40 and the current ECC level</p>
  724. <code class="phpdocumentor-code phpdocumentor-signature ">
  725. <span class="phpdocumentor-signature__visibility">public</span>
  726. <span class="phpdocumentor-signature__name">getMaxBits</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span></code>
  727. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  728. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  729. &mdash;
  730. </article>
  731. <article
  732. class="phpdocumentor-element
  733. -method
  734. -public
  735. "
  736. >
  737. <h4 class="phpdocumentor-element__name" id="method_getOrdinal">
  738. getOrdinal()
  739. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getOrdinal" class="headerlink"><i class="fas fa-link"></i></a>
  740. </h4>
  741. <aside class="phpdocumentor-element-found-in">
  742. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/EccLevel.php"><a href="files/src-common-ecclevel.html"><abbr title="src/Common/EccLevel.php">EccLevel.php</abbr></a></abbr>
  743. :
  744. <span class="phpdocumentor-element-found-in__line">184</span>
  745. </aside>
  746. <p class="phpdocumentor-summary">returns the ordinal value of the current ECC level</p>
  747. <code class="phpdocumentor-code phpdocumentor-signature ">
  748. <span class="phpdocumentor-signature__visibility">public</span>
  749. <span class="phpdocumentor-signature__name">getOrdinal</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  750. <section class="phpdocumentor-description"><p>references to the keys of the following tables:</p>
  751. </section>
  752. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  753. Tags
  754. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  755. </h5>
  756. <dl class="phpdocumentor-tag-list">
  757. <dt class="phpdocumentor-tag-list__entry">
  758. <span class="phpdocumentor-tag__name">see</span>
  759. </dt>
  760. <dd class="phpdocumentor-tag-list__definition">
  761. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_MAX_BITS"><abbr title="\chillerlan\QRCode\Common\EccLevel::MAX_BITS">EccLevel::MAX_BITS</abbr></a></span>
  762. </dd>
  763. <dt class="phpdocumentor-tag-list__entry">
  764. <span class="phpdocumentor-tag__name">see</span>
  765. </dt>
  766. <dd class="phpdocumentor-tag-list__definition">
  767. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Common-EccLevel.html#constant_FORMAT_PATTERN"><abbr title="\chillerlan\QRCode\Common\EccLevel::FORMAT_PATTERN">EccLevel::FORMAT_PATTERN</abbr></a></span>
  768. </dd>
  769. <dt class="phpdocumentor-tag-list__entry">
  770. <span class="phpdocumentor-tag__name">see</span>
  771. </dt>
  772. <dd class="phpdocumentor-tag-list__definition">
  773. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Common-Version.html#constant_RSBLOCKS"><abbr title="\chillerlan\QRCode\Common\Version::RSBLOCKS">Version::RSBLOCKS</abbr></a></span>
  774. </dd>
  775. </dl>
  776. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  777. <span class="phpdocumentor-signature__response_type">int</span>
  778. &mdash;
  779. </article>
  780. </section>
  781. <script type="text/javascript">
  782. function loadExternalCodeSnippets(line) {
  783. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  784. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  785. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  786. var language = 'php';
  787. var code = document.createElement('code');
  788. code.className = 'language-' + language;
  789. pre.textContent = '';
  790. pre.setAttribute('data-line', line)
  791. code.textContent = 'Loading…';
  792. pre.appendChild(code);
  793. var xhr = new XMLHttpRequest();
  794. xhr.open('GET', src, true);
  795. xhr.onreadystatechange = function () {
  796. if (xhr.readyState == 4) {
  797. if (xhr.status < 400 && xhr.responseText) {
  798. code.textContent = xhr.responseText;
  799. Prism.highlightElement(code);
  800. }
  801. else if (xhr.status >= 400) {
  802. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  803. }
  804. else {
  805. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  806. }
  807. }
  808. };
  809. xhr.send(null);
  810. });
  811. }
  812. var modals = document.querySelectorAll("[data-modal]");
  813. modals.forEach(function (trigger) {
  814. trigger.addEventListener("click", function (event) {
  815. //event.preventDefault();
  816. const modal = document.getElementById(trigger.dataset.modal);
  817. modal.classList.add("phpdocumentor-modal__open");
  818. loadExternalCodeSnippets(trigger.dataset.line)
  819. const exits = modal.querySelectorAll("[data-exit-button]");
  820. exits.forEach(function (exit) {
  821. exit.addEventListener("click", function (event) {
  822. event.preventDefault();
  823. modal.classList.remove("phpdocumentor-modal__open");
  824. });
  825. });
  826. });
  827. });
  828. </script>
  829. </article>
  830. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  831. <section class="phpdocumentor-search-results__dialog">
  832. <header class="phpdocumentor-search-results__header">
  833. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  834. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  835. </header>
  836. <section class="phpdocumentor-search-results__body">
  837. <ul class="phpdocumentor-search-results__entries"></ul>
  838. </section>
  839. </section>
  840. </section>
  841. </div>
  842. </div>
  843. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  844. </main>
  845. <script>
  846. cssVars({});
  847. </script>
  848. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  849. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  850. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  851. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  852. </body>
  853. </html>