chillerlan-QRCode-Common-Mode.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  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-qrcode.html">QRCode</a></li>
  107. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  108. </ul>
  109. <article class="phpdocumentor-element -class">
  110. <h2 class="phpdocumentor-content__title">
  111. Mode
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">19</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">Data mode information - ISO 18004:2006, 6.4.1, Tables 2 and 3</p>
  128. <h3 id="toc">
  129. Table of Contents
  130. <a href="classes/chillerlan-QRCode-Common-Mode.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  131. </h3>
  132. <h4 id="toc-constants">
  133. Constants
  134. <a href="classes/chillerlan-QRCode-Common-Mode.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  135. </h4>
  136. <dl class="phpdocumentor-table-of-contents">
  137. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  138. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_ALPHANUM">ALPHANUM</a>
  139. <span>
  140. &nbsp;= 0b10 </span>
  141. </dt>
  142. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  143. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_BYTE">BYTE</a>
  144. <span>
  145. &nbsp;= 0b100 </span>
  146. </dt>
  147. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  148. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_ECI">ECI</a>
  149. <span>
  150. &nbsp;= 0b111 </span>
  151. </dt>
  152. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  153. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_FNC1_FIRST">FNC1_FIRST</a>
  154. <span>
  155. &nbsp;= 0b101 </span>
  156. </dt>
  157. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  158. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_FNC1_SECOND">FNC1_SECOND</a>
  159. <span>
  160. &nbsp;= 0b1001 </span>
  161. </dt>
  162. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  163. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_HANZI">HANZI</a>
  164. <span>
  165. &nbsp;= 0b1101 </span>
  166. </dt>
  167. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  168. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_INTERFACES">INTERFACES</a>
  169. <span>
  170. &nbsp;= [self::NUMBER =&gt; \chillerlan\QRCode\Data\Number::class, self::ALPHANUM =&gt; \chillerlan\QRCode\Data\AlphaNum::class, self::KANJI =&gt; \chillerlan\QRCode\Data\Kanji::class, self::HANZI =&gt; \chillerlan\QRCode\Data\Hanzi::class, self::BYTE =&gt; \chillerlan\QRCode\Data\Byte::class] </span>
  171. </dt>
  172. <dd>Map of data mode =&gt; interface (detection order)</dd>
  173. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  174. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_KANJI">KANJI</a>
  175. <span>
  176. &nbsp;= 0b1000 </span>
  177. </dt>
  178. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  179. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_LENGTH_BITS">LENGTH_BITS</a>
  180. <span>
  181. &nbsp;= [self::NUMBER =&gt; [10, 12, 14], self::ALPHANUM =&gt; [9, 11, 13], self::BYTE =&gt; [8, 16, 16], self::KANJI =&gt; [8, 10, 12], self::HANZI =&gt; [8, 10, 12], self::ECI =&gt; [0, 0, 0]] </span>
  182. </dt>
  183. <dd>mode length bits for the version breakpoints 1-9, 10-26 and 27-40</dd>
  184. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  185. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_NUMBER">NUMBER</a>
  186. <span>
  187. &nbsp;= 0b1 </span>
  188. </dt>
  189. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  190. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_STRCTURED_APPEND">STRCTURED_APPEND</a>
  191. <span>
  192. &nbsp;= 0b11 </span>
  193. </dt>
  194. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  195. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_TERMINATOR">TERMINATOR</a>
  196. <span>
  197. &nbsp;= 0b0 </span>
  198. </dt>
  199. </dl>
  200. <h4 id="toc-methods">
  201. Methods
  202. <a href="classes/chillerlan-QRCode-Common-Mode.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  203. </h4>
  204. <dl class="phpdocumentor-table-of-contents">
  205. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  206. <a href="classes/chillerlan-QRCode-Common-Mode.html#method_getLengthBitsForVersion">getLengthBitsForVersion()</a>
  207. <span>
  208. &nbsp;: int </span>
  209. </dt>
  210. <dd>returns the length bits for the version breakpoints 1-9, 10-26 and 27-40</dd>
  211. </dl>
  212. <section class="phpdocumentor-constants">
  213. <h3 class="phpdocumentor-elements__header" id="constants">
  214. Constants
  215. <a href="classes/chillerlan-QRCode-Common-Mode.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  216. </h3>
  217. <article class="phpdocumentor-element -constant -public ">
  218. <h4 class="phpdocumentor-element__name" id="constant_ALPHANUM">
  219. ALPHANUM
  220. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_ALPHANUM" class="headerlink"><i class="fas fa-link"></i></a>
  221. </h4>
  222. <aside class="phpdocumentor-element-found-in">
  223. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  224. :
  225. <span class="phpdocumentor-element-found-in__line">28</span>
  226. </aside>
  227. <code class="phpdocumentor-signature phpdocumentor-code ">
  228. <span class="phpdocumentor-signature__visibility">public</span>
  229. <span class="phpdocumentor-signature__type">int</span>
  230. <span class="phpdocumentor-signature__name">ALPHANUM</span>
  231. = <span class="phpdocumentor-signature__default-value">0b10</span>
  232. </code>
  233. </article>
  234. <article class="phpdocumentor-element -constant -public ">
  235. <h4 class="phpdocumentor-element__name" id="constant_BYTE">
  236. BYTE
  237. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_BYTE" class="headerlink"><i class="fas fa-link"></i></a>
  238. </h4>
  239. <aside class="phpdocumentor-element-found-in">
  240. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  241. :
  242. <span class="phpdocumentor-element-found-in__line">30</span>
  243. </aside>
  244. <code class="phpdocumentor-signature phpdocumentor-code ">
  245. <span class="phpdocumentor-signature__visibility">public</span>
  246. <span class="phpdocumentor-signature__type">int</span>
  247. <span class="phpdocumentor-signature__name">BYTE</span>
  248. = <span class="phpdocumentor-signature__default-value">0b100</span>
  249. </code>
  250. </article>
  251. <article class="phpdocumentor-element -constant -public ">
  252. <h4 class="phpdocumentor-element__name" id="constant_ECI">
  253. ECI
  254. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_ECI" class="headerlink"><i class="fas fa-link"></i></a>
  255. </h4>
  256. <aside class="phpdocumentor-element-found-in">
  257. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  258. :
  259. <span class="phpdocumentor-element-found-in__line">42</span>
  260. </aside>
  261. <code class="phpdocumentor-signature phpdocumentor-code ">
  262. <span class="phpdocumentor-signature__visibility">public</span>
  263. <span class="phpdocumentor-signature__type">int</span>
  264. <span class="phpdocumentor-signature__name">ECI</span>
  265. = <span class="phpdocumentor-signature__default-value">0b111</span>
  266. </code>
  267. </article>
  268. <article class="phpdocumentor-element -constant -public ">
  269. <h4 class="phpdocumentor-element__name" id="constant_FNC1_FIRST">
  270. FNC1_FIRST
  271. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_FNC1_FIRST" class="headerlink"><i class="fas fa-link"></i></a>
  272. </h4>
  273. <aside class="phpdocumentor-element-found-in">
  274. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  275. :
  276. <span class="phpdocumentor-element-found-in__line">38</span>
  277. </aside>
  278. <code class="phpdocumentor-signature phpdocumentor-code ">
  279. <span class="phpdocumentor-signature__visibility">public</span>
  280. <span class="phpdocumentor-signature__type">int</span>
  281. <span class="phpdocumentor-signature__name">FNC1_FIRST</span>
  282. = <span class="phpdocumentor-signature__default-value">0b101</span>
  283. </code>
  284. </article>
  285. <article class="phpdocumentor-element -constant -public ">
  286. <h4 class="phpdocumentor-element__name" id="constant_FNC1_SECOND">
  287. FNC1_SECOND
  288. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_FNC1_SECOND" class="headerlink"><i class="fas fa-link"></i></a>
  289. </h4>
  290. <aside class="phpdocumentor-element-found-in">
  291. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  292. :
  293. <span class="phpdocumentor-element-found-in__line">40</span>
  294. </aside>
  295. <code class="phpdocumentor-signature phpdocumentor-code ">
  296. <span class="phpdocumentor-signature__visibility">public</span>
  297. <span class="phpdocumentor-signature__type">int</span>
  298. <span class="phpdocumentor-signature__name">FNC1_SECOND</span>
  299. = <span class="phpdocumentor-signature__default-value">0b1001</span>
  300. </code>
  301. </article>
  302. <article class="phpdocumentor-element -constant -public ">
  303. <h4 class="phpdocumentor-element__name" id="constant_HANZI">
  304. HANZI
  305. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_HANZI" class="headerlink"><i class="fas fa-link"></i></a>
  306. </h4>
  307. <aside class="phpdocumentor-element-found-in">
  308. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  309. :
  310. <span class="phpdocumentor-element-found-in__line">34</span>
  311. </aside>
  312. <code class="phpdocumentor-signature phpdocumentor-code ">
  313. <span class="phpdocumentor-signature__visibility">public</span>
  314. <span class="phpdocumentor-signature__type">int</span>
  315. <span class="phpdocumentor-signature__name">HANZI</span>
  316. = <span class="phpdocumentor-signature__default-value">0b1101</span>
  317. </code>
  318. </article>
  319. <article class="phpdocumentor-element -constant -public ">
  320. <h4 class="phpdocumentor-element__name" id="constant_INTERFACES">
  321. INTERFACES
  322. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_INTERFACES" class="headerlink"><i class="fas fa-link"></i></a>
  323. </h4>
  324. <aside class="phpdocumentor-element-found-in">
  325. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  326. :
  327. <span class="phpdocumentor-element-found-in__line">63</span>
  328. </aside>
  329. <p class="phpdocumentor-summary">Map of data mode =&gt; interface (detection order)</p>
  330. <code class="phpdocumentor-signature phpdocumentor-code ">
  331. <span class="phpdocumentor-signature__visibility">public</span>
  332. <span class="phpdocumentor-signature__type">array&lt;string|int, string&gt;</span>
  333. <span class="phpdocumentor-signature__name">INTERFACES</span>
  334. = <span class="phpdocumentor-signature__default-value">[self::NUMBER =&gt; \chillerlan\QRCode\Data\Number::class, self::ALPHANUM =&gt; \chillerlan\QRCode\Data\AlphaNum::class, self::KANJI =&gt; \chillerlan\QRCode\Data\Kanji::class, self::HANZI =&gt; \chillerlan\QRCode\Data\Hanzi::class, self::BYTE =&gt; \chillerlan\QRCode\Data\Byte::class]</span>
  335. </code>
  336. </article>
  337. <article class="phpdocumentor-element -constant -public ">
  338. <h4 class="phpdocumentor-element__name" id="constant_KANJI">
  339. KANJI
  340. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_KANJI" class="headerlink"><i class="fas fa-link"></i></a>
  341. </h4>
  342. <aside class="phpdocumentor-element-found-in">
  343. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  344. :
  345. <span class="phpdocumentor-element-found-in__line">32</span>
  346. </aside>
  347. <code class="phpdocumentor-signature phpdocumentor-code ">
  348. <span class="phpdocumentor-signature__visibility">public</span>
  349. <span class="phpdocumentor-signature__type">int</span>
  350. <span class="phpdocumentor-signature__name">KANJI</span>
  351. = <span class="phpdocumentor-signature__default-value">0b1000</span>
  352. </code>
  353. </article>
  354. <article class="phpdocumentor-element -constant -public ">
  355. <h4 class="phpdocumentor-element__name" id="constant_LENGTH_BITS">
  356. LENGTH_BITS
  357. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_LENGTH_BITS" class="headerlink"><i class="fas fa-link"></i></a>
  358. </h4>
  359. <aside class="phpdocumentor-element-found-in">
  360. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  361. :
  362. <span class="phpdocumentor-element-found-in__line">49</span>
  363. </aside>
  364. <p class="phpdocumentor-summary">mode length bits for the version breakpoints 1-9, 10-26 and 27-40</p>
  365. <code class="phpdocumentor-signature phpdocumentor-code ">
  366. <span class="phpdocumentor-signature__visibility">public</span>
  367. <span class="phpdocumentor-signature__type">mixed</span>
  368. <span class="phpdocumentor-signature__name">LENGTH_BITS</span>
  369. = <span class="phpdocumentor-signature__default-value">[self::NUMBER =&gt; [10, 12, 14], self::ALPHANUM =&gt; [9, 11, 13], self::BYTE =&gt; [8, 16, 16], self::KANJI =&gt; [8, 10, 12], self::HANZI =&gt; [8, 10, 12], self::ECI =&gt; [0, 0, 0]]</span>
  370. </code>
  371. <section class="phpdocumentor-description"><p>ISO/IEC 18004:2000 Table 3 - Number of bits in Character Count Indicator</p>
  372. </section>
  373. </article>
  374. <article class="phpdocumentor-element -constant -public ">
  375. <h4 class="phpdocumentor-element__name" id="constant_NUMBER">
  376. NUMBER
  377. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_NUMBER" class="headerlink"><i class="fas fa-link"></i></a>
  378. </h4>
  379. <aside class="phpdocumentor-element-found-in">
  380. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  381. :
  382. <span class="phpdocumentor-element-found-in__line">26</span>
  383. </aside>
  384. <code class="phpdocumentor-signature phpdocumentor-code ">
  385. <span class="phpdocumentor-signature__visibility">public</span>
  386. <span class="phpdocumentor-signature__type">int</span>
  387. <span class="phpdocumentor-signature__name">NUMBER</span>
  388. = <span class="phpdocumentor-signature__default-value">0b1</span>
  389. </code>
  390. </article>
  391. <article class="phpdocumentor-element -constant -public ">
  392. <h4 class="phpdocumentor-element__name" id="constant_STRCTURED_APPEND">
  393. STRCTURED_APPEND
  394. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_STRCTURED_APPEND" class="headerlink"><i class="fas fa-link"></i></a>
  395. </h4>
  396. <aside class="phpdocumentor-element-found-in">
  397. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  398. :
  399. <span class="phpdocumentor-element-found-in__line">36</span>
  400. </aside>
  401. <code class="phpdocumentor-signature phpdocumentor-code ">
  402. <span class="phpdocumentor-signature__visibility">public</span>
  403. <span class="phpdocumentor-signature__type">int</span>
  404. <span class="phpdocumentor-signature__name">STRCTURED_APPEND</span>
  405. = <span class="phpdocumentor-signature__default-value">0b11</span>
  406. </code>
  407. </article>
  408. <article class="phpdocumentor-element -constant -public ">
  409. <h4 class="phpdocumentor-element__name" id="constant_TERMINATOR">
  410. TERMINATOR
  411. <a href="classes/chillerlan-QRCode-Common-Mode.html#constant_TERMINATOR" class="headerlink"><i class="fas fa-link"></i></a>
  412. </h4>
  413. <aside class="phpdocumentor-element-found-in">
  414. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  415. :
  416. <span class="phpdocumentor-element-found-in__line">24</span>
  417. </aside>
  418. <code class="phpdocumentor-signature phpdocumentor-code ">
  419. <span class="phpdocumentor-signature__visibility">public</span>
  420. <span class="phpdocumentor-signature__type">int</span>
  421. <span class="phpdocumentor-signature__name">TERMINATOR</span>
  422. = <span class="phpdocumentor-signature__default-value">0b0</span>
  423. </code>
  424. </article>
  425. </section>
  426. <section class="phpdocumentor-methods">
  427. <h3 class="phpdocumentor-elements__header" id="methods">
  428. Methods
  429. <a href="classes/chillerlan-QRCode-Common-Mode.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  430. </h3>
  431. <article
  432. class="phpdocumentor-element
  433. -method
  434. -public
  435. -static "
  436. >
  437. <h4 class="phpdocumentor-element__name" id="method_getLengthBitsForVersion">
  438. getLengthBitsForVersion()
  439. <a href="classes/chillerlan-QRCode-Common-Mode.html#method_getLengthBitsForVersion" class="headerlink"><i class="fas fa-link"></i></a>
  440. </h4>
  441. <aside class="phpdocumentor-element-found-in">
  442. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/Mode.php"><a href="files/src-common-mode.html"><abbr title="src/Common/Mode.php">Mode.php</abbr></a></abbr>
  443. :
  444. <span class="phpdocumentor-element-found-in__line">76</span>
  445. </aside>
  446. <p class="phpdocumentor-summary">returns the length bits for the version breakpoints 1-9, 10-26 and 27-40</p>
  447. <code class="phpdocumentor-code phpdocumentor-signature ">
  448. <span class="phpdocumentor-signature__visibility">public</span>
  449. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getLengthBitsForVersion</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">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$version</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  450. <div class="phpdocumentor-label-line">
  451. </div>
  452. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  453. <dl class="phpdocumentor-argument-list">
  454. <dt class="phpdocumentor-argument-list__entry">
  455. <span class="phpdocumentor-signature__argument__name">$mode</span>
  456. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  457. </dt>
  458. <dd class="phpdocumentor-argument-list__definition">
  459. </dd>
  460. <dt class="phpdocumentor-argument-list__entry">
  461. <span class="phpdocumentor-signature__argument__name">$version</span>
  462. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  463. </dt>
  464. <dd class="phpdocumentor-argument-list__definition">
  465. </dd>
  466. </dl>
  467. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  468. Tags
  469. <a href="classes/chillerlan-QRCode-Common-Mode.html#method_getLengthBitsForVersion#tags" class="headerlink"><i class="fas fa-link"></i></a>
  470. </h5>
  471. <dl class="phpdocumentor-tag-list">
  472. <dt class="phpdocumentor-tag-list__entry">
  473. <span class="phpdocumentor-tag__name">throws</span>
  474. </dt>
  475. <dd class="phpdocumentor-tag-list__definition">
  476. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  477. </dd>
  478. </dl>
  479. <section>
  480. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  481. <span class="phpdocumentor-signature__response_type">int</span>
  482. </section>
  483. </article>
  484. </section>
  485. <div class="phpdocumentor-modal" id="source-view">
  486. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  487. <div class="phpdocumentor-modal-container">
  488. <div class="phpdocumentor-modal-content">
  489. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Common/Mode.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  490. </div>
  491. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  492. </div>
  493. </div>
  494. <script type="text/javascript">
  495. (function () {
  496. function loadExternalCodeSnippet(el, url, line) {
  497. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  498. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  499. const language = 'php';
  500. const code = document.createElement('code');
  501. code.className = 'language-' + language;
  502. pre.textContent = '';
  503. pre.setAttribute('data-line', line)
  504. code.textContent = 'Loading…';
  505. pre.appendChild(code);
  506. var xhr = new XMLHttpRequest();
  507. xhr.open('GET', src, true);
  508. xhr.onreadystatechange = function () {
  509. if (xhr.readyState !== 4) {
  510. return;
  511. }
  512. if (xhr.status < 400 && xhr.responseText) {
  513. code.textContent = xhr.responseText;
  514. Prism.highlightElement(code);
  515. return;
  516. }
  517. if (xhr.status === 404) {
  518. code.textContent = '✖ Error: File could not be found';
  519. return;
  520. }
  521. if (xhr.status >= 400) {
  522. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  523. return;
  524. }
  525. code.textContent = '✖ Error: An unknown error occurred';
  526. };
  527. xhr.send(null);
  528. });
  529. }
  530. const modalButtons = document.querySelectorAll("[data-modal]");
  531. const openedAsLocalFile = window.location.protocol === 'file:';
  532. if (modalButtons.length > 0 && openedAsLocalFile) {
  533. console.warn(
  534. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  535. 'browsers block XHR requests when a page is opened this way'
  536. );
  537. }
  538. modalButtons.forEach(function (trigger) {
  539. if (openedAsLocalFile) {
  540. trigger.setAttribute("hidden", "hidden");
  541. }
  542. trigger.addEventListener("click", function (event) {
  543. event.preventDefault();
  544. const modal = document.getElementById(trigger.dataset.modal);
  545. if (!modal) {
  546. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  547. return;
  548. }
  549. modal.classList.add("phpdocumentor-modal__open");
  550. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  551. const exits = modal.querySelectorAll("[data-exit-button]");
  552. exits.forEach(function (exit) {
  553. exit.addEventListener("click", function (event) {
  554. event.preventDefault();
  555. modal.classList.remove("phpdocumentor-modal__open");
  556. });
  557. });
  558. });
  559. });
  560. })();
  561. </script>
  562. </article>
  563. </section>
  564. <section class="phpdocumentor-on-this-page__sidebar">
  565. <section class="phpdocumentor-on-this-page__content">
  566. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  567. <ul class="phpdocumentor-list -clean">
  568. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  569. <li>
  570. <ul class="phpdocumentor-list -clean">
  571. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#toc-constants">Constants</a></li>
  572. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#toc-methods">Methods</a></li>
  573. </ul>
  574. </li>
  575. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  576. <li>
  577. <ul class="phpdocumentor-list -clean">
  578. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_ALPHANUM">ALPHANUM</a></li>
  579. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_BYTE">BYTE</a></li>
  580. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_ECI">ECI</a></li>
  581. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_FNC1_FIRST">FNC1_FIRST</a></li>
  582. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_FNC1_SECOND">FNC1_SECOND</a></li>
  583. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_HANZI">HANZI</a></li>
  584. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_INTERFACES">INTERFACES</a></li>
  585. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_KANJI">KANJI</a></li>
  586. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_LENGTH_BITS">LENGTH_BITS</a></li>
  587. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_NUMBER">NUMBER</a></li>
  588. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_STRCTURED_APPEND">STRCTURED_APPEND</a></li>
  589. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#constant_TERMINATOR">TERMINATOR</a></li>
  590. </ul>
  591. </li>
  592. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  593. <li>
  594. <ul class="phpdocumentor-list -clean">
  595. <li><a href="classes/chillerlan-QRCode-Common-Mode.html#method_getLengthBitsForVersion">getLengthBitsForVersion()</a></li>
  596. </ul>
  597. </li>
  598. </ul>
  599. </section>
  600. </section>
  601. </div>
  602. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  603. <section class="phpdocumentor-search-results__dialog">
  604. <header class="phpdocumentor-search-results__header">
  605. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  606. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  607. </header>
  608. <section class="phpdocumentor-search-results__body">
  609. <ul class="phpdocumentor-search-results__entries"></ul>
  610. </section>
  611. </section>
  612. </section>
  613. </div>
  614. <a href="classes/chillerlan-QRCode-Common-Mode.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  615. </main>
  616. <script>
  617. cssVars({});
  618. </script>
  619. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  620. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  621. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  622. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  623. </body>
  624. </html>