chillerlan-QRCode-Common-Mode.html 37 KB

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