chillerlan-QRCode-Data-Byte.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887
  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=Source+Sans+Pro:wght@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/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace">
  56. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  57. </h4>
  58. <ul class="phpdocumentor-list">
  59. <li>
  60. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  61. </li>
  62. <li>
  63. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  64. </li>
  65. </ul>
  66. </section>
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="packages/Application.html" class="">Application</a>
  71. </h4>
  72. </section>
  73. <section class="phpdocumentor-sidebar__category">
  74. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  75. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  76. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  78. </section>
  79. <section class="phpdocumentor-sidebar__category">
  80. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  81. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  82. </section>
  83. </aside>
  84. <div class="phpdocumentor-column -eight phpdocumentor-content">
  85. <ul class="phpdocumentor-breadcrumbs">
  86. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  87. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  88. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-data.html">Data</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. Byte
  93. <span class="phpdocumentor-element__extends">
  94. extends <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeAbstract">QRDataModeAbstract</abbr></a>
  95. </span>
  96. <div class="phpdocumentor-element__package">
  97. in package
  98. <ul class="phpdocumentor-breadcrumbs">
  99. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  100. </ul>
  101. </div>
  102. </h2>
  103. <aside class="phpdocumentor-element-found-in">
  104. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Byte.php"><a href="files/src-data-byte.html"><abbr title="src/Data/Byte.php">Byte.php</abbr></a></abbr>
  105. :
  106. <span class="phpdocumentor-element-found-in__line">23</span>
  107. </aside>
  108. <p class="phpdocumentor-summary">8-bit Byte mode, ISO-8859-1 or UTF-8</p>
  109. <section class="phpdocumentor-description"><p>ISO/IEC 18004:2000 Section 8.3.4
  110. ISO/IEC 18004:2000 Section 8.4.4</p>
  111. </section>
  112. <h3 id="toc">
  113. Table of Contents
  114. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  115. </h3>
  116. <dl class="phpdocumentor-table-of-contents">
  117. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  118. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data</a>
  119. <span>
  120. &nbsp;: string </span>
  121. </dt>
  122. <dd>The data to write</dd>
  123. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  124. <a href="classes/chillerlan-QRCode-Data-Byte.html#property_datamode">$datamode</a>
  125. <span>
  126. &nbsp;: int </span>
  127. </dt>
  128. <dd>the current data mode: Num, Alphanum, Kanji, Hanzi, Byte</dd>
  129. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  130. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a>
  131. <span>
  132. &nbsp;: mixed </span>
  133. </dt>
  134. <dd>QRDataModeAbstract constructor.</dd>
  135. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  136. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_convertEncoding">convertEncoding()</a>
  137. <span>
  138. &nbsp;: string </span>
  139. </dt>
  140. <dd>encoding conversion helper</dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  142. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_decodeSegment">decodeSegment()</a>
  143. <span>
  144. &nbsp;: string </span>
  145. </dt>
  146. <dd></dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  148. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getDataMode">getDataMode()</a>
  149. <span>
  150. &nbsp;: int </span>
  151. </dt>
  152. <dd>returns the current data mode constant</dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  154. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_getLengthInBits">getLengthInBits()</a>
  155. <span>
  156. &nbsp;: int </span>
  157. </dt>
  158. <dd></dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_validateString">validateString()</a>
  161. <span>
  162. &nbsp;: bool </span>
  163. </dt>
  164. <dd></dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_write">write()</a>
  167. <span>
  168. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a> </span>
  169. </dt>
  170. <dd></dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  172. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getCharCount">getCharCount()</a>
  173. <span>
  174. &nbsp;: int </span>
  175. </dt>
  176. <dd>returns the character count of the $data string</dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  178. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a>
  179. <span>
  180. &nbsp;: int </span>
  181. </dt>
  182. <dd>shortcut</dd>
  183. </dl>
  184. <section class="phpdocumentor-properties">
  185. <h3 class="phpdocumentor-elements__header" id="properties">
  186. Properties
  187. <a href="classes/chillerlan-QRCode-Data-Byte.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  188. </h3>
  189. <article
  190. class="
  191. phpdocumentor-element
  192. -property
  193. -protected
  194. "
  195. >
  196. <h4 class="phpdocumentor-element__name" id="property_data">
  197. $data
  198. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data" class="headerlink"><i class="fas fa-link"></i></a>
  199. <span class="phpdocumentor-element__modifiers">
  200. </span>
  201. </h4>
  202. <aside class="phpdocumentor-element-found-in">
  203. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  204. :
  205. <span class="phpdocumentor-element-found-in__line">28</span>
  206. </aside>
  207. <p class="phpdocumentor-summary">The data to write</p>
  208. <code class="phpdocumentor-code phpdocumentor-signature ">
  209. <span class="phpdocumentor-signature__visibility">protected</span>
  210. <span class="phpdocumentor-signature__type">string</span>
  211. <span class="phpdocumentor-signature__name">$data</span>
  212. </code>
  213. <section class="phpdocumentor-description"></section>
  214. </article>
  215. <article
  216. class="
  217. phpdocumentor-element
  218. -property
  219. -protected
  220. -static "
  221. >
  222. <h4 class="phpdocumentor-element__name" id="property_datamode">
  223. $datamode
  224. <a href="classes/chillerlan-QRCode-Data-Byte.html#property_datamode" class="headerlink"><i class="fas fa-link"></i></a>
  225. <span class="phpdocumentor-element__modifiers">
  226. </span>
  227. </h4>
  228. <aside class="phpdocumentor-element-found-in">
  229. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Byte.php"><a href="files/src-data-byte.html"><abbr title="src/Data/Byte.php">Byte.php</abbr></a></abbr>
  230. :
  231. <span class="phpdocumentor-element-found-in__line">28</span>
  232. </aside>
  233. <p class="phpdocumentor-summary">the current data mode: Num, Alphanum, Kanji, Hanzi, Byte</p>
  234. <code class="phpdocumentor-code phpdocumentor-signature ">
  235. <span class="phpdocumentor-signature__visibility">protected</span>
  236. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__type">int</span>
  237. <span class="phpdocumentor-signature__name">$datamode</span>
  238. = <span class="phpdocumentor-signature__default-value">\chillerlan\QRCode\Common\Mode::BYTE</span></code>
  239. <section class="phpdocumentor-description"></section>
  240. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  241. Tags
  242. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  243. </h5>
  244. <dl class="phpdocumentor-tag-list">
  245. <dt class="phpdocumentor-tag-list__entry">
  246. <span class="phpdocumentor-tag__name">inheritDoc</span>
  247. </dt>
  248. <dd class="phpdocumentor-tag-list__definition">
  249. </dd>
  250. </dl>
  251. </article>
  252. </section>
  253. <section class="phpdocumentor-methods">
  254. <h3 class="phpdocumentor-elements__header" id="methods">
  255. Methods
  256. <a href="classes/chillerlan-QRCode-Data-Byte.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  257. </h3>
  258. <article
  259. class="phpdocumentor-element
  260. -method
  261. -public
  262. "
  263. >
  264. <h4 class="phpdocumentor-element__name" id="method___construct">
  265. __construct()
  266. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  267. </h4>
  268. <aside class="phpdocumentor-element-found-in">
  269. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  270. :
  271. <span class="phpdocumentor-element-found-in__line">35</span>
  272. </aside>
  273. <p class="phpdocumentor-summary">QRDataModeAbstract constructor.</p>
  274. <code class="phpdocumentor-code phpdocumentor-signature ">
  275. <span class="phpdocumentor-signature__visibility">public</span>
  276. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  277. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  278. <dl class="phpdocumentor-argument-list">
  279. <dt class="phpdocumentor-argument-list__entry">
  280. <span class="phpdocumentor-signature__argument__name">$data</span>
  281. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  282. </dt>
  283. <dd class="phpdocumentor-argument-list__definition">
  284. <section class="phpdocumentor-description"></section>
  285. </dd>
  286. </dl>
  287. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  288. Tags
  289. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  290. </h5>
  291. <dl class="phpdocumentor-tag-list">
  292. <dt class="phpdocumentor-tag-list__entry">
  293. <span class="phpdocumentor-tag__name">throws</span>
  294. </dt>
  295. <dd class="phpdocumentor-tag-list__definition">
  296. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  297. </dd>
  298. </dl>
  299. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  300. <span class="phpdocumentor-signature__response_type">mixed</span>
  301. &mdash;
  302. </article>
  303. <article
  304. class="phpdocumentor-element
  305. -method
  306. -public
  307. -static "
  308. >
  309. <h4 class="phpdocumentor-element__name" id="method_convertEncoding">
  310. convertEncoding()
  311. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_convertEncoding" class="headerlink"><i class="fas fa-link"></i></a>
  312. </h4>
  313. <aside class="phpdocumentor-element-found-in">
  314. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  315. :
  316. <span class="phpdocumentor-element-found-in__line">62</span>
  317. </aside>
  318. <p class="phpdocumentor-summary">encoding conversion helper</p>
  319. <code class="phpdocumentor-code phpdocumentor-signature ">
  320. <span class="phpdocumentor-signature__visibility">public</span>
  321. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">convertEncoding</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$string</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  322. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  323. <dl class="phpdocumentor-argument-list">
  324. <dt class="phpdocumentor-argument-list__entry">
  325. <span class="phpdocumentor-signature__argument__name">$string</span>
  326. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  327. </dt>
  328. <dd class="phpdocumentor-argument-list__definition">
  329. <section class="phpdocumentor-description"></section>
  330. </dd>
  331. </dl>
  332. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  333. Tags
  334. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  335. </h5>
  336. <dl class="phpdocumentor-tag-list">
  337. <dt class="phpdocumentor-tag-list__entry">
  338. <span class="phpdocumentor-tag__name">inheritDoc</span>
  339. </dt>
  340. <dd class="phpdocumentor-tag-list__definition">
  341. </dd>
  342. </dl>
  343. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  344. <span class="phpdocumentor-signature__response_type">string</span>
  345. &mdash;
  346. </article>
  347. <article
  348. class="phpdocumentor-element
  349. -method
  350. -public
  351. -static "
  352. >
  353. <h4 class="phpdocumentor-element__name" id="method_decodeSegment">
  354. decodeSegment()
  355. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_decodeSegment" class="headerlink"><i class="fas fa-link"></i></a>
  356. </h4>
  357. <aside class="phpdocumentor-element-found-in">
  358. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Byte.php"><a href="files/src-data-byte.html"><abbr title="src/Data/Byte.php">Byte.php</abbr></a></abbr>
  359. :
  360. <span class="phpdocumentor-element-found-in__line">70</span>
  361. </aside>
  362. <code class="phpdocumentor-code phpdocumentor-signature ">
  363. <span class="phpdocumentor-signature__visibility">public</span>
  364. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">decodeSegment</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bitBuffer</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">$versionNumber</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  365. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  366. <dl class="phpdocumentor-argument-list">
  367. <dt class="phpdocumentor-argument-list__entry">
  368. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  369. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  370. </dt>
  371. <dd class="phpdocumentor-argument-list__definition">
  372. <section class="phpdocumentor-description"></section>
  373. </dd>
  374. <dt class="phpdocumentor-argument-list__entry">
  375. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  376. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  377. </dt>
  378. <dd class="phpdocumentor-argument-list__definition">
  379. <section class="phpdocumentor-description"></section>
  380. </dd>
  381. </dl>
  382. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  383. Tags
  384. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  385. </h5>
  386. <dl class="phpdocumentor-tag-list">
  387. <dt class="phpdocumentor-tag-list__entry">
  388. <span class="phpdocumentor-tag__name">inheritDoc</span>
  389. </dt>
  390. <dd class="phpdocumentor-tag-list__definition">
  391. </dd>
  392. <dt class="phpdocumentor-tag-list__entry">
  393. <span class="phpdocumentor-tag__name">throws</span>
  394. </dt>
  395. <dd class="phpdocumentor-tag-list__definition">
  396. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  397. </dd>
  398. </dl>
  399. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  400. <span class="phpdocumentor-signature__response_type">string</span>
  401. &mdash;
  402. </article>
  403. <article
  404. class="phpdocumentor-element
  405. -method
  406. -public
  407. "
  408. >
  409. <h4 class="phpdocumentor-element__name" id="method_getDataMode">
  410. getDataMode()
  411. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getDataMode" class="headerlink"><i class="fas fa-link"></i></a>
  412. </h4>
  413. <aside class="phpdocumentor-element-found-in">
  414. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  415. :
  416. <span class="phpdocumentor-element-found-in__line">55</span>
  417. </aside>
  418. <p class="phpdocumentor-summary">returns the current data mode constant</p>
  419. <code class="phpdocumentor-code phpdocumentor-signature ">
  420. <span class="phpdocumentor-signature__visibility">public</span>
  421. <span class="phpdocumentor-signature__name">getDataMode</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  422. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  423. Tags
  424. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  425. </h5>
  426. <dl class="phpdocumentor-tag-list">
  427. <dt class="phpdocumentor-tag-list__entry">
  428. <span class="phpdocumentor-tag__name">inheritDoc</span>
  429. </dt>
  430. <dd class="phpdocumentor-tag-list__definition">
  431. </dd>
  432. </dl>
  433. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  434. <span class="phpdocumentor-signature__response_type">int</span>
  435. &mdash;
  436. </article>
  437. <article
  438. class="phpdocumentor-element
  439. -method
  440. -public
  441. "
  442. >
  443. <h4 class="phpdocumentor-element__name" id="method_getLengthInBits">
  444. getLengthInBits()
  445. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_getLengthInBits" class="headerlink"><i class="fas fa-link"></i></a>
  446. </h4>
  447. <aside class="phpdocumentor-element-found-in">
  448. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Byte.php"><a href="files/src-data-byte.html"><abbr title="src/Data/Byte.php">Byte.php</abbr></a></abbr>
  449. :
  450. <span class="phpdocumentor-element-found-in__line">33</span>
  451. </aside>
  452. <code class="phpdocumentor-code phpdocumentor-signature ">
  453. <span class="phpdocumentor-signature__visibility">public</span>
  454. <span class="phpdocumentor-signature__name">getLengthInBits</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  455. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  456. Tags
  457. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  458. </h5>
  459. <dl class="phpdocumentor-tag-list">
  460. <dt class="phpdocumentor-tag-list__entry">
  461. <span class="phpdocumentor-tag__name">inheritDoc</span>
  462. </dt>
  463. <dd class="phpdocumentor-tag-list__definition">
  464. </dd>
  465. </dl>
  466. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  467. <span class="phpdocumentor-signature__response_type">int</span>
  468. &mdash;
  469. </article>
  470. <article
  471. class="phpdocumentor-element
  472. -method
  473. -public
  474. -static "
  475. >
  476. <h4 class="phpdocumentor-element__name" id="method_validateString">
  477. validateString()
  478. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_validateString" class="headerlink"><i class="fas fa-link"></i></a>
  479. </h4>
  480. <aside class="phpdocumentor-element-found-in">
  481. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Byte.php"><a href="files/src-data-byte.html"><abbr title="src/Data/Byte.php">Byte.php</abbr></a></abbr>
  482. :
  483. <span class="phpdocumentor-element-found-in__line">40</span>
  484. </aside>
  485. <code class="phpdocumentor-code phpdocumentor-signature ">
  486. <span class="phpdocumentor-signature__visibility">public</span>
  487. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">validateString</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$string</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  488. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  489. <dl class="phpdocumentor-argument-list">
  490. <dt class="phpdocumentor-argument-list__entry">
  491. <span class="phpdocumentor-signature__argument__name">$string</span>
  492. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  493. </dt>
  494. <dd class="phpdocumentor-argument-list__definition">
  495. <section class="phpdocumentor-description"></section>
  496. </dd>
  497. </dl>
  498. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  499. Tags
  500. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  501. </h5>
  502. <dl class="phpdocumentor-tag-list">
  503. <dt class="phpdocumentor-tag-list__entry">
  504. <span class="phpdocumentor-tag__name">inheritDoc</span>
  505. </dt>
  506. <dd class="phpdocumentor-tag-list__definition">
  507. </dd>
  508. </dl>
  509. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  510. <span class="phpdocumentor-signature__response_type">bool</span>
  511. &mdash;
  512. </article>
  513. <article
  514. class="phpdocumentor-element
  515. -method
  516. -public
  517. "
  518. >
  519. <h4 class="phpdocumentor-element__name" id="method_write">
  520. write()
  521. <a href="classes/chillerlan-QRCode-Data-Byte.html#method_write" class="headerlink"><i class="fas fa-link"></i></a>
  522. </h4>
  523. <aside class="phpdocumentor-element-found-in">
  524. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Byte.php"><a href="files/src-data-byte.html"><abbr title="src/Data/Byte.php">Byte.php</abbr></a></abbr>
  525. :
  526. <span class="phpdocumentor-element-found-in__line">47</span>
  527. </aside>
  528. <code class="phpdocumentor-code phpdocumentor-signature ">
  529. <span class="phpdocumentor-signature__visibility">public</span>
  530. <span class="phpdocumentor-signature__name">write</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bitBuffer</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">$versionNumber</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a></span></code>
  531. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  532. <dl class="phpdocumentor-argument-list">
  533. <dt class="phpdocumentor-argument-list__entry">
  534. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  535. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  536. </dt>
  537. <dd class="phpdocumentor-argument-list__definition">
  538. <section class="phpdocumentor-description"></section>
  539. </dd>
  540. <dt class="phpdocumentor-argument-list__entry">
  541. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  542. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  543. </dt>
  544. <dd class="phpdocumentor-argument-list__definition">
  545. <section class="phpdocumentor-description"></section>
  546. </dd>
  547. </dl>
  548. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  549. Tags
  550. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  551. </h5>
  552. <dl class="phpdocumentor-tag-list">
  553. <dt class="phpdocumentor-tag-list__entry">
  554. <span class="phpdocumentor-tag__name">inheritDoc</span>
  555. </dt>
  556. <dd class="phpdocumentor-tag-list__definition">
  557. </dd>
  558. </dl>
  559. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  560. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a></span>
  561. &mdash;
  562. </article>
  563. <article
  564. class="phpdocumentor-element
  565. -method
  566. -protected
  567. "
  568. >
  569. <h4 class="phpdocumentor-element__name" id="method_getCharCount">
  570. getCharCount()
  571. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getCharCount" class="headerlink"><i class="fas fa-link"></i></a>
  572. </h4>
  573. <aside class="phpdocumentor-element-found-in">
  574. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  575. :
  576. <span class="phpdocumentor-element-found-in__line">48</span>
  577. </aside>
  578. <p class="phpdocumentor-summary">returns the character count of the $data string</p>
  579. <code class="phpdocumentor-code phpdocumentor-signature ">
  580. <span class="phpdocumentor-signature__visibility">protected</span>
  581. <span class="phpdocumentor-signature__name">getCharCount</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  582. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  583. <span class="phpdocumentor-signature__response_type">int</span>
  584. &mdash;
  585. </article>
  586. <article
  587. class="phpdocumentor-element
  588. -method
  589. -protected
  590. -static "
  591. >
  592. <h4 class="phpdocumentor-element__name" id="method_getLengthBits">
  593. getLengthBits()
  594. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits" class="headerlink"><i class="fas fa-link"></i></a>
  595. </h4>
  596. <aside class="phpdocumentor-element-found-in">
  597. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  598. :
  599. <span class="phpdocumentor-element-found-in__line">69</span>
  600. </aside>
  601. <p class="phpdocumentor-summary">shortcut</p>
  602. <code class="phpdocumentor-code phpdocumentor-signature ">
  603. <span class="phpdocumentor-signature__visibility">protected</span>
  604. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getLengthBits</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$versionNumber</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  605. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  606. <dl class="phpdocumentor-argument-list">
  607. <dt class="phpdocumentor-argument-list__entry">
  608. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  609. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  610. </dt>
  611. <dd class="phpdocumentor-argument-list__definition">
  612. <section class="phpdocumentor-description"></section>
  613. </dd>
  614. </dl>
  615. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  616. <span class="phpdocumentor-signature__response_type">int</span>
  617. &mdash;
  618. </article>
  619. </section>
  620. <script type="text/javascript">
  621. function loadExternalCodeSnippets(line) {
  622. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  623. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  624. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  625. var language = 'php';
  626. var code = document.createElement('code');
  627. code.className = 'language-' + language;
  628. pre.textContent = '';
  629. pre.setAttribute('data-line', line)
  630. code.textContent = 'Loading…';
  631. pre.appendChild(code);
  632. var xhr = new XMLHttpRequest();
  633. xhr.open('GET', src, true);
  634. xhr.onreadystatechange = function () {
  635. if (xhr.readyState == 4) {
  636. if (xhr.status < 400 && xhr.responseText) {
  637. code.textContent = xhr.responseText;
  638. Prism.highlightElement(code);
  639. }
  640. else if (xhr.status >= 400) {
  641. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  642. }
  643. else {
  644. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  645. }
  646. }
  647. };
  648. xhr.send(null);
  649. });
  650. }
  651. var modals = document.querySelectorAll("[data-modal]");
  652. modals.forEach(function (trigger) {
  653. trigger.addEventListener("click", function (event) {
  654. //event.preventDefault();
  655. const modal = document.getElementById(trigger.dataset.modal);
  656. modal.classList.add("phpdocumentor-modal__open");
  657. loadExternalCodeSnippets(trigger.dataset.line)
  658. const exits = modal.querySelectorAll("[data-exit-button]");
  659. exits.forEach(function (exit) {
  660. exit.addEventListener("click", function (event) {
  661. event.preventDefault();
  662. modal.classList.remove("phpdocumentor-modal__open");
  663. });
  664. });
  665. });
  666. });
  667. </script>
  668. </article>
  669. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  670. <section class="phpdocumentor-search-results__dialog">
  671. <header class="phpdocumentor-search-results__header">
  672. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  673. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  674. </header>
  675. <section class="phpdocumentor-search-results__body">
  676. <ul class="phpdocumentor-search-results__entries"></ul>
  677. </section>
  678. </section>
  679. </section>
  680. </div>
  681. </div>
  682. <a href="classes/chillerlan-QRCode-Data-Byte.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  683. </main>
  684. <script>
  685. cssVars({});
  686. </script>
  687. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  688. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  689. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  690. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  691. </body>
  692. </html>