chillerlan-QRCode-Common-EccLevel.html 45 KB

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