chillerlan-QRCode-Common-EccLevel.html 41 KB

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