chillerlan-QRCode-Common-EccLevel.html 41 KB

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