chillerlan-QRCode-Common-EccLevel.html 45 KB

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