chillerlan-QRCode-Common-Mode.html 38 KB

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