chillerlan-QRCode-Common-Mode.html 37 KB

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