chillerlan-QRCode-Data-Byte.html 45 KB

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