chillerlan-QRCode-Common-EccLevel.html 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079
  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">151</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">todo:</span>
  626. </dt>
  627. <dd class="phpdocumentor-tag-list__definition">
  628. <section class="phpdocumentor-description"><p>accept string values (PHP8+)</p>
  629. </section>
  630. </dd>
  631. <dt class="phpdocumentor-tag-list__entry">
  632. <span class="phpdocumentor-tag__name">see</span>
  633. </dt>
  634. <dd class="phpdocumentor-tag-list__definition">
  635. <span class="phpdocumentor-tag-link"><a href="https://github.com/chillerlan/php-qrcode/discussions/160"><abbr title="https://github.com/chillerlan/php-qrcode/discussions/160">https://github.com/chillerlan/php-qrcode/discussions/160</abbr></a></span>
  636. </dd>
  637. <dt class="phpdocumentor-tag-list__entry">
  638. <span class="phpdocumentor-tag__name">throws</span>
  639. </dt>
  640. <dd class="phpdocumentor-tag-list__definition">
  641. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  642. </dd>
  643. </dl>
  644. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  645. <span class="phpdocumentor-signature__response_type">mixed</span>
  646. &mdash;
  647. </article>
  648. <article
  649. class="phpdocumentor-element
  650. -method
  651. -public
  652. "
  653. >
  654. <h4 class="phpdocumentor-element__name" id="method___toString">
  655. __toString()
  656. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___toString" class="headerlink"><i class="fas fa-link"></i></a>
  657. </h4>
  658. <aside class="phpdocumentor-element-found-in">
  659. <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>
  660. :
  661. <span class="phpdocumentor-element-found-in__line">163</span>
  662. </aside>
  663. <p class="phpdocumentor-summary">returns the string representation of the current ECC level</p>
  664. <code class="phpdocumentor-code phpdocumentor-signature ">
  665. <span class="phpdocumentor-signature__visibility">public</span>
  666. <span class="phpdocumentor-signature__name">__toString</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  667. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  668. <span class="phpdocumentor-signature__response_type">string</span>
  669. &mdash;
  670. </article>
  671. <article
  672. class="phpdocumentor-element
  673. -method
  674. -public
  675. "
  676. >
  677. <h4 class="phpdocumentor-element__name" id="method_getformatPattern">
  678. getformatPattern()
  679. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getformatPattern" class="headerlink"><i class="fas fa-link"></i></a>
  680. </h4>
  681. <aside class="phpdocumentor-element-found-in">
  682. <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>
  683. :
  684. <span class="phpdocumentor-element-found-in__line">200</span>
  685. </aside>
  686. <p class="phpdocumentor-summary">returns the format pattern for the given $eccLevel and $maskPattern</p>
  687. <code class="phpdocumentor-code phpdocumentor-signature ">
  688. <span class="phpdocumentor-signature__visibility">public</span>
  689. <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>
  690. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  691. <dl class="phpdocumentor-argument-list">
  692. <dt class="phpdocumentor-argument-list__entry">
  693. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  694. : <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>
  695. </dt>
  696. <dd class="phpdocumentor-argument-list__definition">
  697. <section class="phpdocumentor-description"></section>
  698. </dd>
  699. </dl>
  700. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  701. <span class="phpdocumentor-signature__response_type">int</span>
  702. &mdash;
  703. </article>
  704. <article
  705. class="phpdocumentor-element
  706. -method
  707. -public
  708. "
  709. >
  710. <h4 class="phpdocumentor-element__name" id="method_getLevel">
  711. getLevel()
  712. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getLevel" class="headerlink"><i class="fas fa-link"></i></a>
  713. </h4>
  714. <aside class="phpdocumentor-element-found-in">
  715. <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>
  716. :
  717. <span class="phpdocumentor-element-found-in__line">175</span>
  718. </aside>
  719. <p class="phpdocumentor-summary">returns the current ECC level</p>
  720. <code class="phpdocumentor-code phpdocumentor-signature ">
  721. <span class="phpdocumentor-signature__visibility">public</span>
  722. <span class="phpdocumentor-signature__name">getLevel</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  723. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  724. <span class="phpdocumentor-signature__response_type">int</span>
  725. &mdash;
  726. </article>
  727. <article
  728. class="phpdocumentor-element
  729. -method
  730. -public
  731. "
  732. >
  733. <h4 class="phpdocumentor-element__name" id="method_getMaxBits">
  734. getMaxBits()
  735. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getMaxBits" class="headerlink"><i class="fas fa-link"></i></a>
  736. </h4>
  737. <aside class="phpdocumentor-element-found-in">
  738. <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>
  739. :
  740. <span class="phpdocumentor-element-found-in__line">209</span>
  741. </aside>
  742. <p class="phpdocumentor-summary">returns an array with the max bit lengths for version 1-40 and the current ECC level</p>
  743. <code class="phpdocumentor-code phpdocumentor-signature ">
  744. <span class="phpdocumentor-signature__visibility">public</span>
  745. <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>
  746. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  747. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  748. &mdash;
  749. </article>
  750. <article
  751. class="phpdocumentor-element
  752. -method
  753. -public
  754. "
  755. >
  756. <h4 class="phpdocumentor-element__name" id="method_getOrdinal">
  757. getOrdinal()
  758. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getOrdinal" class="headerlink"><i class="fas fa-link"></i></a>
  759. </h4>
  760. <aside class="phpdocumentor-element-found-in">
  761. <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>
  762. :
  763. <span class="phpdocumentor-element-found-in__line">188</span>
  764. </aside>
  765. <p class="phpdocumentor-summary">returns the ordinal value of the current ECC level</p>
  766. <code class="phpdocumentor-code phpdocumentor-signature ">
  767. <span class="phpdocumentor-signature__visibility">public</span>
  768. <span class="phpdocumentor-signature__name">getOrdinal</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  769. <section class="phpdocumentor-description"><p>references to the keys of the following tables:</p>
  770. </section>
  771. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  772. Tags
  773. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  774. </h5>
  775. <dl class="phpdocumentor-tag-list">
  776. <dt class="phpdocumentor-tag-list__entry">
  777. <span class="phpdocumentor-tag__name">see</span>
  778. </dt>
  779. <dd class="phpdocumentor-tag-list__definition">
  780. <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>
  781. </dd>
  782. <dt class="phpdocumentor-tag-list__entry">
  783. <span class="phpdocumentor-tag__name">see</span>
  784. </dt>
  785. <dd class="phpdocumentor-tag-list__definition">
  786. <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>
  787. </dd>
  788. <dt class="phpdocumentor-tag-list__entry">
  789. <span class="phpdocumentor-tag__name">see</span>
  790. </dt>
  791. <dd class="phpdocumentor-tag-list__definition">
  792. <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>
  793. </dd>
  794. </dl>
  795. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  796. <span class="phpdocumentor-signature__response_type">int</span>
  797. &mdash;
  798. </article>
  799. </section>
  800. <script type="text/javascript">
  801. function loadExternalCodeSnippets(line) {
  802. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  803. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  804. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  805. var language = 'php';
  806. var code = document.createElement('code');
  807. code.className = 'language-' + language;
  808. pre.textContent = '';
  809. pre.setAttribute('data-line', line)
  810. code.textContent = 'Loading…';
  811. pre.appendChild(code);
  812. var xhr = new XMLHttpRequest();
  813. xhr.open('GET', src, true);
  814. xhr.onreadystatechange = function () {
  815. if (xhr.readyState == 4) {
  816. if (xhr.status < 400 && xhr.responseText) {
  817. code.textContent = xhr.responseText;
  818. Prism.highlightElement(code);
  819. }
  820. else if (xhr.status >= 400) {
  821. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  822. }
  823. else {
  824. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  825. }
  826. }
  827. };
  828. xhr.send(null);
  829. });
  830. }
  831. var modals = document.querySelectorAll("[data-modal]");
  832. modals.forEach(function (trigger) {
  833. trigger.addEventListener("click", function (event) {
  834. //event.preventDefault();
  835. const modal = document.getElementById(trigger.dataset.modal);
  836. modal.classList.add("phpdocumentor-modal__open");
  837. loadExternalCodeSnippets(trigger.dataset.line)
  838. const exits = modal.querySelectorAll("[data-exit-button]");
  839. exits.forEach(function (exit) {
  840. exit.addEventListener("click", function (event) {
  841. event.preventDefault();
  842. modal.classList.remove("phpdocumentor-modal__open");
  843. });
  844. });
  845. });
  846. });
  847. </script>
  848. </article>
  849. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  850. <section class="phpdocumentor-search-results__dialog">
  851. <header class="phpdocumentor-search-results__header">
  852. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  853. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  854. </header>
  855. <section class="phpdocumentor-search-results__body">
  856. <ul class="phpdocumentor-search-results__entries"></ul>
  857. </section>
  858. </section>
  859. </section>
  860. </div>
  861. </div>
  862. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  863. </main>
  864. <script>
  865. cssVars({});
  866. </script>
  867. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  868. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  869. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  870. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  871. </body>
  872. </html>