chillerlan-QRCodeTest-QRMaxLengthTrait.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  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=Open+Sans:wght@100;200;300;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/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. <h4 class="phpdocumentor-sidebar__root-namespace">
  82. <a href="namespaces/output.html" class="">Output</a>
  83. </h4>
  84. </section>
  85. <section class="phpdocumentor-sidebar__category">
  86. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  87. <h4 class="phpdocumentor-sidebar__root-namespace">
  88. <a href="packages/Application.html" class="">Application</a>
  89. </h4>
  90. </section>
  91. <section class="phpdocumentor-sidebar__category">
  92. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  93. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  94. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  96. </section>
  97. <section class="phpdocumentor-sidebar__category">
  98. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  100. </section>
  101. </aside>
  102. <div class="phpdocumentor-column -nine phpdocumentor-content">
  103. <section>
  104. <ul class="phpdocumentor-breadcrumbs">
  105. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  106. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a></li>
  107. </ul>
  108. <article class="phpdocumentor-element -trait">
  109. <h2 class="phpdocumentor-content__title">
  110. QRMaxLengthTrait
  111. </h2>
  112. <aside class="phpdocumentor-element-found-in">
  113. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRMaxLengthTrait.php"><a href="files/tests-qrmaxlengthtrait.html"><abbr title="tests/QRMaxLengthTrait.php">QRMaxLengthTrait.php</abbr></a></abbr>
  114. :
  115. <span class="phpdocumentor-element-found-in__line">19</span>
  116. </aside>
  117. <p class="phpdocumentor-summary">Trait QRMaxLengthTrait</p>
  118. <h3 id="toc">
  119. Table of Contents
  120. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  121. </h3>
  122. <h4 id="toc-constants">
  123. Constants
  124. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  125. </h4>
  126. <dl class="phpdocumentor-table-of-contents">
  127. <dt class="phpdocumentor-table-of-contents__entry -constant -protected">
  128. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#constant_MAX_LENGTH">MAX_LENGTH</a>
  129. <span>
  130. &nbsp;= [
  131. // v =&gt; [NUMERIC =&gt; [L, M, Q, H ], ALPHANUM =&gt; [L, M, Q, H], BINARY =&gt; [L, M, Q, H ], KANJI =&gt; [L, M, Q, H ]]
  132. 1 =&gt; [[41, 34, 27, 17], [25, 20, 16, 10], [17, 14, 11, 7], [10, 8, 7, 4]],
  133. 2 =&gt; [[77, 63, 48, 34], [47, 38, 29, 20], [32, 26, 20, 14], [20, 16, 12, 8]],
  134. 3 =&gt; [[127, 101, 77, 58], [77, 61, 47, 35], [53, 42, 32, 24], [32, 26, 20, 15]],
  135. 4 =&gt; [[187, 149, 111, 82], [114, 90, 67, 50], [78, 62, 46, 34], [48, 38, 28, 21]],
  136. 5 =&gt; [[255, 202, 144, 106], [154, 122, 87, 64], [106, 84, 60, 44], [65, 52, 37, 27]],
  137. 6 =&gt; [[322, 255, 178, 139], [195, 154, 108, 84], [134, 106, 74, 58], [82, 65, 45, 36]],
  138. 7 =&gt; [[370, 293, 207, 154], [224, 178, 125, 93], [154, 122, 86, 64], [95, 75, 53, 39]],
  139. 8 =&gt; [[461, 365, 259, 202], [279, 221, 157, 122], [192, 152, 108, 84], [118, 93, 66, 52]],
  140. 9 =&gt; [[552, 432, 312, 235], [335, 262, 189, 143], [230, 180, 130, 98], [141, 111, 80, 60]],
  141. 10 =&gt; [[652, 513, 364, 288], [395, 311, 221, 174], [271, 213, 151, 119], [167, 131, 93, 74]],
  142. 11 =&gt; [[772, 604, 427, 331], [468, 366, 259, 200], [321, 251, 177, 137], [198, 155, 109, 85]],
  143. 12 =&gt; [[883, 691, 489, 374], [535, 419, 296, 227], [367, 287, 203, 155], [226, 177, 125, 96]],
  144. 13 =&gt; [[1022, 796, 580, 427], [619, 483, 352, 259], [425, 331, 241, 177], [262, 204, 149, 109]],
  145. 14 =&gt; [[1101, 871, 621, 468], [667, 528, 376, 283], [458, 362, 258, 194], [282, 223, 159, 120]],
  146. 15 =&gt; [[1250, 991, 703, 530], [758, 600, 426, 321], [520, 412, 292, 220], [320, 254, 180, 136]],
  147. 16 =&gt; [[1408, 1082, 775, 602], [854, 656, 470, 365], [586, 450, 322, 250], [361, 277, 198, 154]],
  148. 17 =&gt; [[1548, 1212, 876, 674], [938, 734, 531, 408], [644, 504, 364, 280], [397, 310, 224, 173]],
  149. 18 =&gt; [[1725, 1346, 948, 746], [1046, 816, 574, 452], [718, 560, 394, 310], [442, 345, 243, 191]],
  150. 19 =&gt; [[1903, 1500, 1063, 813], [1153, 909, 644, 493], [792, 624, 442, 338], [488, 384, 272, 208]],
  151. 20 =&gt; [[2061, 1600, 1159, 919], [1249, 970, 702, 557], [858, 666, 482, 382], [528, 410, 297, 235]],
  152. 21 =&gt; [[2232, 1708, 1224, 969], [1352, 1035, 742, 587], [929, 711, 509, 403], [572, 438, 314, 248]],
  153. 22 =&gt; [[2409, 1872, 1358, 1056], [1460, 1134, 823, 640], [1003, 779, 565, 439], [618, 480, 348, 270]],
  154. 23 =&gt; [[2620, 2059, 1468, 1108], [1588, 1248, 890, 672], [1091, 857, 611, 461], [672, 528, 376, 284]],
  155. 24 =&gt; [[2812, 2188, 1588, 1228], [1704, 1326, 963, 744], [1171, 911, 661, 511], [721, 561, 407, 315]],
  156. 25 =&gt; [[3057, 2395, 1718, 1286], [1853, 1451, 1041, 779], [1273, 997, 715, 535], [784, 614, 440, 330]],
  157. 26 =&gt; [[3283, 2544, 1804, 1425], [1990, 1542, 1094, 864], [1367, 1059, 751, 593], [842, 652, 462, 365]],
  158. 27 =&gt; [[3517, 2701, 1933, 1501], [2132, 1637, 1172, 910], [1465, 1125, 805, 625], [902, 692, 496, 385]],
  159. 28 =&gt; [[3669, 2857, 2085, 1581], [2223, 1732, 1263, 958], [1528, 1190, 868, 658], [940, 732, 534, 405]],
  160. 29 =&gt; [[3909, 3035, 2181, 1677], [2369, 1839, 1322, 1016], [1628, 1264, 908, 698], [1002, 778, 559, 430]],
  161. 30 =&gt; [[4158, 3289, 2358, 1782], [2520, 1994, 1429, 1080], [1732, 1370, 982, 742], [1066, 843, 604, 457]],
  162. 31 =&gt; [[4417, 3486, 2473, 1897], [2677, 2113, 1499, 1150], [1840, 1452, 1030, 790], [1132, 894, 634, 486]],
  163. 32 =&gt; [[4686, 3693, 2670, 2022], [2840, 2238, 1618, 1226], [1952, 1538, 1112, 842], [1201, 947, 684, 518]],
  164. 33 =&gt; [[4965, 3909, 2805, 2157], [3009, 2369, 1700, 1307], [2068, 1628, 1168, 898], [1273, 1002, 719, 553]],
  165. 34 =&gt; [[5253, 4134, 2949, 2301], [3183, 2506, 1787, 1394], [2188, 1722, 1228, 958], [1347, 1060, 756, 590]],
  166. 35 =&gt; [[5529, 4343, 3081, 2361], [3351, 2632, 1867, 1431], [2303, 1809, 1283, 983], [1417, 1113, 790, 605]],
  167. 36 =&gt; [[5836, 4588, 3244, 2524], [3537, 2780, 1966, 1530], [2431, 1911, 1351, 1051], [1496, 1176, 832, 647]],
  168. 37 =&gt; [[6153, 4775, 3417, 2625], [3729, 2894, 2071, 1591], [2563, 1989, 1423, 1093], [1577, 1224, 876, 673]],
  169. 38 =&gt; [[6479, 5039, 3599, 2735], [3927, 3054, 2181, 1658], [2699, 2099, 1499, 1139], [1661, 1292, 923, 701]],
  170. 39 =&gt; [[6743, 5313, 3791, 2927], [4087, 3220, 2298, 1774], [2809, 2213, 1579, 1219], [1729, 1362, 972, 750]],
  171. 40 =&gt; [[7089, 5596, 3993, 3057], [4296, 3391, 2420, 1852], [2953, 2331, 1663, 1273], [1817, 1435, 1024, 784]],
  172. ] </span>
  173. </dt>
  174. <dd>ISO/IEC 18004:2000 Tables 7-11 - Number of symbol characters and input data capacity for versions 1 to 40</dd>
  175. </dl>
  176. <h4 id="toc-methods">
  177. Methods
  178. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  179. </h4>
  180. <dl class="phpdocumentor-table-of-contents">
  181. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  182. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#method_getMaxLengthForMode">getMaxLengthForMode()</a>
  183. <span>
  184. &nbsp;: int </span>
  185. </dt>
  186. <dd>the maximum character count for the given $mode and $eccLevel</dd>
  187. </dl>
  188. <section class="phpdocumentor-constants">
  189. <h3 class="phpdocumentor-elements__header" id="constants">
  190. Constants
  191. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  192. </h3>
  193. <article class="phpdocumentor-element -constant -protected ">
  194. <h4 class="phpdocumentor-element__name" id="constant_MAX_LENGTH">
  195. MAX_LENGTH
  196. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#constant_MAX_LENGTH" class="headerlink"><i class="fas fa-link"></i></a>
  197. </h4>
  198. <aside class="phpdocumentor-element-found-in">
  199. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRMaxLengthTrait.php"><a href="files/tests-qrmaxlengthtrait.html"><abbr title="tests/QRMaxLengthTrait.php">QRMaxLengthTrait.php</abbr></a></abbr>
  200. :
  201. <span class="phpdocumentor-element-found-in__line">28</span>
  202. </aside>
  203. <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>
  204. <code class="phpdocumentor-signature phpdocumentor-code ">
  205. <span class="phpdocumentor-signature__visibility">protected</span>
  206. <span class="phpdocumentor-signature__type">array&lt;string|int, array&lt;string|int, array&lt;string|int, int&gt;&gt;&gt;</span>
  207. <span class="phpdocumentor-signature__name">MAX_LENGTH</span>
  208. = <span class="phpdocumentor-signature__default-value">[
  209. // v =&gt; [NUMERIC =&gt; [L, M, Q, H ], ALPHANUM =&gt; [L, M, Q, H], BINARY =&gt; [L, M, Q, H ], KANJI =&gt; [L, M, Q, H ]]
  210. 1 =&gt; [[41, 34, 27, 17], [25, 20, 16, 10], [17, 14, 11, 7], [10, 8, 7, 4]],
  211. 2 =&gt; [[77, 63, 48, 34], [47, 38, 29, 20], [32, 26, 20, 14], [20, 16, 12, 8]],
  212. 3 =&gt; [[127, 101, 77, 58], [77, 61, 47, 35], [53, 42, 32, 24], [32, 26, 20, 15]],
  213. 4 =&gt; [[187, 149, 111, 82], [114, 90, 67, 50], [78, 62, 46, 34], [48, 38, 28, 21]],
  214. 5 =&gt; [[255, 202, 144, 106], [154, 122, 87, 64], [106, 84, 60, 44], [65, 52, 37, 27]],
  215. 6 =&gt; [[322, 255, 178, 139], [195, 154, 108, 84], [134, 106, 74, 58], [82, 65, 45, 36]],
  216. 7 =&gt; [[370, 293, 207, 154], [224, 178, 125, 93], [154, 122, 86, 64], [95, 75, 53, 39]],
  217. 8 =&gt; [[461, 365, 259, 202], [279, 221, 157, 122], [192, 152, 108, 84], [118, 93, 66, 52]],
  218. 9 =&gt; [[552, 432, 312, 235], [335, 262, 189, 143], [230, 180, 130, 98], [141, 111, 80, 60]],
  219. 10 =&gt; [[652, 513, 364, 288], [395, 311, 221, 174], [271, 213, 151, 119], [167, 131, 93, 74]],
  220. 11 =&gt; [[772, 604, 427, 331], [468, 366, 259, 200], [321, 251, 177, 137], [198, 155, 109, 85]],
  221. 12 =&gt; [[883, 691, 489, 374], [535, 419, 296, 227], [367, 287, 203, 155], [226, 177, 125, 96]],
  222. 13 =&gt; [[1022, 796, 580, 427], [619, 483, 352, 259], [425, 331, 241, 177], [262, 204, 149, 109]],
  223. 14 =&gt; [[1101, 871, 621, 468], [667, 528, 376, 283], [458, 362, 258, 194], [282, 223, 159, 120]],
  224. 15 =&gt; [[1250, 991, 703, 530], [758, 600, 426, 321], [520, 412, 292, 220], [320, 254, 180, 136]],
  225. 16 =&gt; [[1408, 1082, 775, 602], [854, 656, 470, 365], [586, 450, 322, 250], [361, 277, 198, 154]],
  226. 17 =&gt; [[1548, 1212, 876, 674], [938, 734, 531, 408], [644, 504, 364, 280], [397, 310, 224, 173]],
  227. 18 =&gt; [[1725, 1346, 948, 746], [1046, 816, 574, 452], [718, 560, 394, 310], [442, 345, 243, 191]],
  228. 19 =&gt; [[1903, 1500, 1063, 813], [1153, 909, 644, 493], [792, 624, 442, 338], [488, 384, 272, 208]],
  229. 20 =&gt; [[2061, 1600, 1159, 919], [1249, 970, 702, 557], [858, 666, 482, 382], [528, 410, 297, 235]],
  230. 21 =&gt; [[2232, 1708, 1224, 969], [1352, 1035, 742, 587], [929, 711, 509, 403], [572, 438, 314, 248]],
  231. 22 =&gt; [[2409, 1872, 1358, 1056], [1460, 1134, 823, 640], [1003, 779, 565, 439], [618, 480, 348, 270]],
  232. 23 =&gt; [[2620, 2059, 1468, 1108], [1588, 1248, 890, 672], [1091, 857, 611, 461], [672, 528, 376, 284]],
  233. 24 =&gt; [[2812, 2188, 1588, 1228], [1704, 1326, 963, 744], [1171, 911, 661, 511], [721, 561, 407, 315]],
  234. 25 =&gt; [[3057, 2395, 1718, 1286], [1853, 1451, 1041, 779], [1273, 997, 715, 535], [784, 614, 440, 330]],
  235. 26 =&gt; [[3283, 2544, 1804, 1425], [1990, 1542, 1094, 864], [1367, 1059, 751, 593], [842, 652, 462, 365]],
  236. 27 =&gt; [[3517, 2701, 1933, 1501], [2132, 1637, 1172, 910], [1465, 1125, 805, 625], [902, 692, 496, 385]],
  237. 28 =&gt; [[3669, 2857, 2085, 1581], [2223, 1732, 1263, 958], [1528, 1190, 868, 658], [940, 732, 534, 405]],
  238. 29 =&gt; [[3909, 3035, 2181, 1677], [2369, 1839, 1322, 1016], [1628, 1264, 908, 698], [1002, 778, 559, 430]],
  239. 30 =&gt; [[4158, 3289, 2358, 1782], [2520, 1994, 1429, 1080], [1732, 1370, 982, 742], [1066, 843, 604, 457]],
  240. 31 =&gt; [[4417, 3486, 2473, 1897], [2677, 2113, 1499, 1150], [1840, 1452, 1030, 790], [1132, 894, 634, 486]],
  241. 32 =&gt; [[4686, 3693, 2670, 2022], [2840, 2238, 1618, 1226], [1952, 1538, 1112, 842], [1201, 947, 684, 518]],
  242. 33 =&gt; [[4965, 3909, 2805, 2157], [3009, 2369, 1700, 1307], [2068, 1628, 1168, 898], [1273, 1002, 719, 553]],
  243. 34 =&gt; [[5253, 4134, 2949, 2301], [3183, 2506, 1787, 1394], [2188, 1722, 1228, 958], [1347, 1060, 756, 590]],
  244. 35 =&gt; [[5529, 4343, 3081, 2361], [3351, 2632, 1867, 1431], [2303, 1809, 1283, 983], [1417, 1113, 790, 605]],
  245. 36 =&gt; [[5836, 4588, 3244, 2524], [3537, 2780, 1966, 1530], [2431, 1911, 1351, 1051], [1496, 1176, 832, 647]],
  246. 37 =&gt; [[6153, 4775, 3417, 2625], [3729, 2894, 2071, 1591], [2563, 1989, 1423, 1093], [1577, 1224, 876, 673]],
  247. 38 =&gt; [[6479, 5039, 3599, 2735], [3927, 3054, 2181, 1658], [2699, 2099, 1499, 1139], [1661, 1292, 923, 701]],
  248. 39 =&gt; [[6743, 5313, 3791, 2927], [4087, 3220, 2298, 1774], [2809, 2213, 1579, 1219], [1729, 1362, 972, 750]],
  249. 40 =&gt; [[7089, 5596, 3993, 3057], [4296, 3391, 2420, 1852], [2953, 2331, 1663, 1273], [1817, 1435, 1024, 784]],
  250. ]</span>
  251. </code>
  252. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  253. Tags
  254. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#constant_MAX_LENGTH#tags" class="headerlink"><i class="fas fa-link"></i></a>
  255. </h5>
  256. <dl class="phpdocumentor-tag-list">
  257. <dt class="phpdocumentor-tag-list__entry">
  258. <span class="phpdocumentor-tag__name">see</span>
  259. </dt>
  260. <dd class="phpdocumentor-tag-list__definition">
  261. <span class="phpdocumentor-tag-link"><a href="http://www.qrcode.com/en/about/version.html">http://www.qrcode.com/en/about/version.html</a></span>
  262. </dd>
  263. </dl>
  264. </article>
  265. </section>
  266. <section class="phpdocumentor-methods">
  267. <h3 class="phpdocumentor-elements__header" id="methods">
  268. Methods
  269. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  270. </h3>
  271. <article
  272. class="phpdocumentor-element
  273. -method
  274. -public
  275. -static "
  276. >
  277. <h4 class="phpdocumentor-element__name" id="method_getMaxLengthForMode">
  278. getMaxLengthForMode()
  279. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#method_getMaxLengthForMode" class="headerlink"><i class="fas fa-link"></i></a>
  280. </h4>
  281. <aside class="phpdocumentor-element-found-in">
  282. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRMaxLengthTrait.php"><a href="files/tests-qrmaxlengthtrait.html"><abbr title="tests/QRMaxLengthTrait.php">QRMaxLengthTrait.php</abbr></a></abbr>
  283. :
  284. <span class="phpdocumentor-element-found-in__line">79</span>
  285. </aside>
  286. <p class="phpdocumentor-summary">the maximum character count for the given $mode and $eccLevel</p>
  287. <code class="phpdocumentor-code phpdocumentor-signature ">
  288. <span class="phpdocumentor-signature__visibility">public</span>
  289. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getMaxLengthForMode</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$mode</span></span><span class="phpdocumentor-signature__argument"><span>, </span><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 class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$eccLevel</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  290. <div class="phpdocumentor-label-line">
  291. </div>
  292. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  293. <dl class="phpdocumentor-argument-list">
  294. <dt class="phpdocumentor-argument-list__entry">
  295. <span class="phpdocumentor-signature__argument__name">$mode</span>
  296. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  297. </dt>
  298. <dd class="phpdocumentor-argument-list__definition">
  299. </dd>
  300. <dt class="phpdocumentor-argument-list__entry">
  301. <span class="phpdocumentor-signature__argument__name">$version</span>
  302. : <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>
  303. </dt>
  304. <dd class="phpdocumentor-argument-list__definition">
  305. </dd>
  306. <dt class="phpdocumentor-argument-list__entry">
  307. <span class="phpdocumentor-signature__argument__name">$eccLevel</span>
  308. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a></span>
  309. </dt>
  310. <dd class="phpdocumentor-argument-list__definition">
  311. </dd>
  312. </dl>
  313. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  314. Tags
  315. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#method_getMaxLengthForMode#tags" class="headerlink"><i class="fas fa-link"></i></a>
  316. </h5>
  317. <dl class="phpdocumentor-tag-list">
  318. <dt class="phpdocumentor-tag-list__entry">
  319. <span class="phpdocumentor-tag__name">throws</span>
  320. </dt>
  321. <dd class="phpdocumentor-tag-list__definition">
  322. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  323. </dd>
  324. <dt class="phpdocumentor-tag-list__entry">
  325. <span class="phpdocumentor-tag__name">codeCoverageIgnore</span>
  326. </dt>
  327. <dd class="phpdocumentor-tag-list__definition">
  328. </dd>
  329. </dl>
  330. <section>
  331. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  332. <span class="phpdocumentor-signature__response_type">int</span>
  333. </section>
  334. </article>
  335. </section>
  336. <div class="phpdocumentor-modal" id="source-view">
  337. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  338. <div class="phpdocumentor-modal-container">
  339. <div class="phpdocumentor-modal-content">
  340. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/tests/QRMaxLengthTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  341. </div>
  342. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  343. </div>
  344. </div>
  345. <script type="text/javascript">
  346. (function () {
  347. function loadExternalCodeSnippet(el, url, line) {
  348. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  349. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  350. const language = 'php';
  351. const code = document.createElement('code');
  352. code.className = 'language-' + language;
  353. pre.textContent = '';
  354. pre.setAttribute('data-line', line)
  355. code.textContent = 'Loading…';
  356. pre.appendChild(code);
  357. var xhr = new XMLHttpRequest();
  358. xhr.open('GET', src, true);
  359. xhr.onreadystatechange = function () {
  360. if (xhr.readyState !== 4) {
  361. return;
  362. }
  363. if (xhr.status < 400 && xhr.responseText) {
  364. code.textContent = xhr.responseText;
  365. Prism.highlightElement(code);
  366. return;
  367. }
  368. if (xhr.status === 404) {
  369. code.textContent = '✖ Error: File could not be found';
  370. return;
  371. }
  372. if (xhr.status >= 400) {
  373. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  374. return;
  375. }
  376. code.textContent = '✖ Error: An unknown error occurred';
  377. };
  378. xhr.send(null);
  379. });
  380. }
  381. const modalButtons = document.querySelectorAll("[data-modal]");
  382. const openedAsLocalFile = window.location.protocol === 'file:';
  383. if (modalButtons.length > 0 && openedAsLocalFile) {
  384. console.warn(
  385. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  386. 'browsers block XHR requests when a page is opened this way'
  387. );
  388. }
  389. modalButtons.forEach(function (trigger) {
  390. if (openedAsLocalFile) {
  391. trigger.setAttribute("hidden", "hidden");
  392. }
  393. trigger.addEventListener("click", function (event) {
  394. event.preventDefault();
  395. const modal = document.getElementById(trigger.dataset.modal);
  396. if (!modal) {
  397. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  398. return;
  399. }
  400. modal.classList.add("phpdocumentor-modal__open");
  401. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  402. const exits = modal.querySelectorAll("[data-exit-button]");
  403. exits.forEach(function (exit) {
  404. exit.addEventListener("click", function (event) {
  405. event.preventDefault();
  406. modal.classList.remove("phpdocumentor-modal__open");
  407. });
  408. });
  409. });
  410. });
  411. })();
  412. </script>
  413. </article>
  414. </section>
  415. <section class="phpdocumentor-on-this-page__sidebar">
  416. <section class="phpdocumentor-on-this-page__content">
  417. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  418. <ul class="phpdocumentor-list -clean">
  419. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  420. <li>
  421. <ul class="phpdocumentor-list -clean">
  422. <li><a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#toc-constants">Constants</a></li>
  423. <li><a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#toc-methods">Methods</a></li>
  424. </ul>
  425. </li>
  426. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  427. <li>
  428. <ul class="phpdocumentor-list -clean">
  429. <li><a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#constant_MAX_LENGTH">MAX_LENGTH</a></li>
  430. </ul>
  431. </li>
  432. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  433. <li>
  434. <ul class="phpdocumentor-list -clean">
  435. <li><a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#method_getMaxLengthForMode">getMaxLengthForMode()</a></li>
  436. </ul>
  437. </li>
  438. </ul>
  439. </section>
  440. </section>
  441. </div>
  442. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  443. <section class="phpdocumentor-search-results__dialog">
  444. <header class="phpdocumentor-search-results__header">
  445. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  446. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  447. </header>
  448. <section class="phpdocumentor-search-results__body">
  449. <ul class="phpdocumentor-search-results__entries"></ul>
  450. </section>
  451. </section>
  452. </section>
  453. </div>
  454. <a href="classes/chillerlan-QRCodeTest-QRMaxLengthTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  455. </main>
  456. <script>
  457. cssVars({});
  458. </script>
  459. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  460. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  461. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  462. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  463. </body>
  464. </html>