chillerlan-QRCode-Common-EccLevel.html 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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">int</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. <section class="phpdocumentor-description"><p>[][]</p>
  547. </section>
  548. </article>
  549. </section>
  550. <section class="phpdocumentor-properties">
  551. <h3 class="phpdocumentor-elements__header" id="properties">
  552. Properties
  553. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  554. </h3>
  555. <article
  556. class="
  557. phpdocumentor-element
  558. -property
  559. -private
  560. "
  561. >
  562. <h4 class="phpdocumentor-element__name" id="property_eccLevel">
  563. $eccLevel
  564. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#property_eccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  565. <span class="phpdocumentor-element__modifiers">
  566. </span>
  567. </h4>
  568. <aside class="phpdocumentor-element-found-in">
  569. <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>
  570. :
  571. <span class="phpdocumentor-element-found-in__line">141</span>
  572. </aside>
  573. <p class="phpdocumentor-summary">The current ECC level value</p>
  574. <code class="phpdocumentor-code phpdocumentor-signature ">
  575. <span class="phpdocumentor-signature__visibility">private</span>
  576. <span class="phpdocumentor-signature__type">int</span>
  577. <span class="phpdocumentor-signature__name">$eccLevel</span>
  578. </code>
  579. <section class="phpdocumentor-description"><p>L: 0b01
  580. M: 0b00
  581. Q: 0b11
  582. H: 0b10</p>
  583. </section>
  584. <section class="phpdocumentor-description"></section>
  585. </article>
  586. </section>
  587. <section class="phpdocumentor-methods">
  588. <h3 class="phpdocumentor-elements__header" id="methods">
  589. Methods
  590. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  591. </h3>
  592. <article
  593. class="phpdocumentor-element
  594. -method
  595. -public
  596. "
  597. >
  598. <h4 class="phpdocumentor-element__name" id="method___construct">
  599. __construct()
  600. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  601. </h4>
  602. <aside class="phpdocumentor-element-found-in">
  603. <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>
  604. :
  605. <span class="phpdocumentor-element-found-in__line">148</span>
  606. </aside>
  607. <code class="phpdocumentor-code phpdocumentor-signature ">
  608. <span class="phpdocumentor-signature__visibility">public</span>
  609. <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>
  610. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  611. <dl class="phpdocumentor-argument-list">
  612. <dt class="phpdocumentor-argument-list__entry">
  613. <span class="phpdocumentor-signature__argument__name">$eccLevel</span>
  614. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  615. </dt>
  616. <dd class="phpdocumentor-argument-list__definition">
  617. <section class="phpdocumentor-description"><p>containing the two bits encoding a QR Code's error correction level</p>
  618. </section>
  619. </dd>
  620. </dl>
  621. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  622. Tags
  623. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  624. </h5>
  625. <dl class="phpdocumentor-tag-list">
  626. <dt class="phpdocumentor-tag-list__entry">
  627. <span class="phpdocumentor-tag__name">throws</span>
  628. </dt>
  629. <dd class="phpdocumentor-tag-list__definition">
  630. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  631. </dd>
  632. </dl>
  633. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  634. <span class="phpdocumentor-signature__response_type">mixed</span>
  635. &mdash;
  636. </article>
  637. <article
  638. class="phpdocumentor-element
  639. -method
  640. -public
  641. "
  642. >
  643. <h4 class="phpdocumentor-element__name" id="method___toString">
  644. __toString()
  645. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method___toString" class="headerlink"><i class="fas fa-link"></i></a>
  646. </h4>
  647. <aside class="phpdocumentor-element-found-in">
  648. <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>
  649. :
  650. <span class="phpdocumentor-element-found-in__line">160</span>
  651. </aside>
  652. <p class="phpdocumentor-summary">returns the string representation of the current ECC level</p>
  653. <code class="phpdocumentor-code phpdocumentor-signature ">
  654. <span class="phpdocumentor-signature__visibility">public</span>
  655. <span class="phpdocumentor-signature__name">__toString</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  656. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  657. <span class="phpdocumentor-signature__response_type">string</span>
  658. &mdash;
  659. </article>
  660. <article
  661. class="phpdocumentor-element
  662. -method
  663. -public
  664. "
  665. >
  666. <h4 class="phpdocumentor-element__name" id="method_getformatPattern">
  667. getformatPattern()
  668. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getformatPattern" class="headerlink"><i class="fas fa-link"></i></a>
  669. </h4>
  670. <aside class="phpdocumentor-element-found-in">
  671. <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>
  672. :
  673. <span class="phpdocumentor-element-found-in__line">197</span>
  674. </aside>
  675. <p class="phpdocumentor-summary">returns the format pattern for the given $eccLevel and $maskPattern</p>
  676. <code class="phpdocumentor-code phpdocumentor-signature ">
  677. <span class="phpdocumentor-signature__visibility">public</span>
  678. <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>
  679. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  680. <dl class="phpdocumentor-argument-list">
  681. <dt class="phpdocumentor-argument-list__entry">
  682. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  683. : <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>
  684. </dt>
  685. <dd class="phpdocumentor-argument-list__definition">
  686. <section class="phpdocumentor-description"></section>
  687. </dd>
  688. </dl>
  689. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  690. <span class="phpdocumentor-signature__response_type">int</span>
  691. &mdash;
  692. </article>
  693. <article
  694. class="phpdocumentor-element
  695. -method
  696. -public
  697. "
  698. >
  699. <h4 class="phpdocumentor-element__name" id="method_getLevel">
  700. getLevel()
  701. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getLevel" class="headerlink"><i class="fas fa-link"></i></a>
  702. </h4>
  703. <aside class="phpdocumentor-element-found-in">
  704. <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>
  705. :
  706. <span class="phpdocumentor-element-found-in__line">172</span>
  707. </aside>
  708. <p class="phpdocumentor-summary">returns the current ECC level</p>
  709. <code class="phpdocumentor-code phpdocumentor-signature ">
  710. <span class="phpdocumentor-signature__visibility">public</span>
  711. <span class="phpdocumentor-signature__name">getLevel</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  712. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  713. <span class="phpdocumentor-signature__response_type">int</span>
  714. &mdash;
  715. </article>
  716. <article
  717. class="phpdocumentor-element
  718. -method
  719. -public
  720. "
  721. >
  722. <h4 class="phpdocumentor-element__name" id="method_getMaxBits">
  723. getMaxBits()
  724. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getMaxBits" class="headerlink"><i class="fas fa-link"></i></a>
  725. </h4>
  726. <aside class="phpdocumentor-element-found-in">
  727. <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>
  728. :
  729. <span class="phpdocumentor-element-found-in__line">206</span>
  730. </aside>
  731. <p class="phpdocumentor-summary">returns an array with the max bit lengths for version 1-40 and the current ECC level</p>
  732. <code class="phpdocumentor-code phpdocumentor-signature ">
  733. <span class="phpdocumentor-signature__visibility">public</span>
  734. <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>
  735. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  736. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  737. &mdash;
  738. </article>
  739. <article
  740. class="phpdocumentor-element
  741. -method
  742. -public
  743. "
  744. >
  745. <h4 class="phpdocumentor-element__name" id="method_getOrdinal">
  746. getOrdinal()
  747. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#method_getOrdinal" class="headerlink"><i class="fas fa-link"></i></a>
  748. </h4>
  749. <aside class="phpdocumentor-element-found-in">
  750. <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>
  751. :
  752. <span class="phpdocumentor-element-found-in__line">185</span>
  753. </aside>
  754. <p class="phpdocumentor-summary">returns the ordinal value of the current ECC level</p>
  755. <code class="phpdocumentor-code phpdocumentor-signature ">
  756. <span class="phpdocumentor-signature__visibility">public</span>
  757. <span class="phpdocumentor-signature__name">getOrdinal</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  758. <section class="phpdocumentor-description"><p>references to the keys of the following tables:</p>
  759. </section>
  760. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  761. Tags
  762. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  763. </h5>
  764. <dl class="phpdocumentor-tag-list">
  765. <dt class="phpdocumentor-tag-list__entry">
  766. <span class="phpdocumentor-tag__name">see</span>
  767. </dt>
  768. <dd class="phpdocumentor-tag-list__definition">
  769. <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>
  770. </dd>
  771. <dt class="phpdocumentor-tag-list__entry">
  772. <span class="phpdocumentor-tag__name">see</span>
  773. </dt>
  774. <dd class="phpdocumentor-tag-list__definition">
  775. <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>
  776. </dd>
  777. <dt class="phpdocumentor-tag-list__entry">
  778. <span class="phpdocumentor-tag__name">see</span>
  779. </dt>
  780. <dd class="phpdocumentor-tag-list__definition">
  781. <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>
  782. </dd>
  783. </dl>
  784. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  785. <span class="phpdocumentor-signature__response_type">int</span>
  786. &mdash;
  787. </article>
  788. </section>
  789. <script type="text/javascript">
  790. function loadExternalCodeSnippets(line) {
  791. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  792. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  793. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  794. var language = 'php';
  795. var code = document.createElement('code');
  796. code.className = 'language-' + language;
  797. pre.textContent = '';
  798. pre.setAttribute('data-line', line)
  799. code.textContent = 'Loading…';
  800. pre.appendChild(code);
  801. var xhr = new XMLHttpRequest();
  802. xhr.open('GET', src, true);
  803. xhr.onreadystatechange = function () {
  804. if (xhr.readyState == 4) {
  805. if (xhr.status < 400 && xhr.responseText) {
  806. code.textContent = xhr.responseText;
  807. Prism.highlightElement(code);
  808. }
  809. else if (xhr.status >= 400) {
  810. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  811. }
  812. else {
  813. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  814. }
  815. }
  816. };
  817. xhr.send(null);
  818. });
  819. }
  820. var modals = document.querySelectorAll("[data-modal]");
  821. modals.forEach(function (trigger) {
  822. trigger.addEventListener("click", function (event) {
  823. //event.preventDefault();
  824. const modal = document.getElementById(trigger.dataset.modal);
  825. modal.classList.add("phpdocumentor-modal__open");
  826. loadExternalCodeSnippets(trigger.dataset.line)
  827. const exits = modal.querySelectorAll("[data-exit-button]");
  828. exits.forEach(function (exit) {
  829. exit.addEventListener("click", function (event) {
  830. event.preventDefault();
  831. modal.classList.remove("phpdocumentor-modal__open");
  832. });
  833. });
  834. });
  835. });
  836. </script>
  837. </article>
  838. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  839. <section class="phpdocumentor-search-results__dialog">
  840. <header class="phpdocumentor-search-results__header">
  841. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  842. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  843. </header>
  844. <section class="phpdocumentor-search-results__body">
  845. <ul class="phpdocumentor-search-results__entries"></ul>
  846. </section>
  847. </section>
  848. </section>
  849. </div>
  850. </div>
  851. <a href="classes/chillerlan-QRCode-Common-EccLevel.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  852. </main>
  853. <script>
  854. cssVars({});
  855. </script>
  856. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  857. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  858. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  859. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  860. </body>
  861. </html>