chillerlan-QRCode-Data-Byte.html 46 KB

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