chillerlan-QRCode-Common-BitBuffer.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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-common.html">Common</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. BitBuffer
  93. <div class="phpdocumentor-element__package">
  94. in package
  95. <ul class="phpdocumentor-breadcrumbs">
  96. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  97. </ul>
  98. </div>
  99. </h2>
  100. <aside class="phpdocumentor-element-found-in">
  101. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  102. :
  103. <span class="phpdocumentor-element-found-in__line">19</span>
  104. </aside>
  105. <p class="phpdocumentor-summary">Holds the raw binary data</p>
  106. <h3 id="toc">
  107. Table of Contents
  108. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  109. </h3>
  110. <dl class="phpdocumentor-table-of-contents">
  111. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  112. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_bitsRead">$bitsRead</a>
  113. <span>
  114. &nbsp;: int </span>
  115. </dt>
  116. <dd>Read count (bits)</dd>
  117. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  118. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_buffer">$buffer</a>
  119. <span>
  120. &nbsp;: array&lt;string|int, mixed&gt; </span>
  121. </dt>
  122. <dd>The buffer content</dd>
  123. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  124. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_bytesRead">$bytesRead</a>
  125. <span>
  126. &nbsp;: int </span>
  127. </dt>
  128. <dd>Read count (bytes)</dd>
  129. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  130. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_length">$length</a>
  131. <span>
  132. &nbsp;: int </span>
  133. </dt>
  134. <dd>Length of the content (bits)</dd>
  135. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  136. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method___construct">__construct()</a>
  137. <span>
  138. &nbsp;: mixed </span>
  139. </dt>
  140. <dd>BitBuffer constructor.</dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  142. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_available">available()</a>
  143. <span>
  144. &nbsp;: int </span>
  145. </dt>
  146. <dd></dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  148. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_clear">clear()</a>
  149. <span>
  150. &nbsp;: self </span>
  151. </dt>
  152. <dd>Clears the buffer and resets the stats</dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  154. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_getBuffer">getBuffer()</a>
  155. <span>
  156. &nbsp;: array&lt;string|int, mixed&gt; </span>
  157. </dt>
  158. <dd>returns the buffer content</dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_getLength">getLength()</a>
  161. <span>
  162. &nbsp;: int </span>
  163. </dt>
  164. <dd>returns the current buffer length</dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_put">put()</a>
  167. <span>
  168. &nbsp;: self </span>
  169. </dt>
  170. <dd>appends a sequence of bits</dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  172. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_putBit">putBit()</a>
  173. <span>
  174. &nbsp;: self </span>
  175. </dt>
  176. <dd>appends a single bit</dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  178. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_read">read()</a>
  179. <span>
  180. &nbsp;: int </span>
  181. </dt>
  182. <dd></dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  184. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_rewind">rewind()</a>
  185. <span>
  186. &nbsp;: self </span>
  187. </dt>
  188. <dd>Resets the read-counters</dd>
  189. </dl>
  190. <section class="phpdocumentor-properties">
  191. <h3 class="phpdocumentor-elements__header" id="properties">
  192. Properties
  193. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  194. </h3>
  195. <article
  196. class="
  197. phpdocumentor-element
  198. -property
  199. -private
  200. "
  201. >
  202. <h4 class="phpdocumentor-element__name" id="property_bitsRead">
  203. $bitsRead
  204. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_bitsRead" class="headerlink"><i class="fas fa-link"></i></a>
  205. <span class="phpdocumentor-element__modifiers">
  206. </span>
  207. </h4>
  208. <aside class="phpdocumentor-element-found-in">
  209. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  210. :
  211. <span class="phpdocumentor-element-found-in__line">41</span>
  212. </aside>
  213. <p class="phpdocumentor-summary">Read count (bits)</p>
  214. <code class="phpdocumentor-code phpdocumentor-signature ">
  215. <span class="phpdocumentor-signature__visibility">private</span>
  216. <span class="phpdocumentor-signature__type">int</span>
  217. <span class="phpdocumentor-signature__name">$bitsRead</span>
  218. = <span class="phpdocumentor-signature__default-value">0</span></code>
  219. <section class="phpdocumentor-description"></section>
  220. </article>
  221. <article
  222. class="
  223. phpdocumentor-element
  224. -property
  225. -private
  226. "
  227. >
  228. <h4 class="phpdocumentor-element__name" id="property_buffer">
  229. $buffer
  230. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_buffer" class="headerlink"><i class="fas fa-link"></i></a>
  231. <span class="phpdocumentor-element__modifiers">
  232. </span>
  233. </h4>
  234. <aside class="phpdocumentor-element-found-in">
  235. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  236. :
  237. <span class="phpdocumentor-element-found-in__line">26</span>
  238. </aside>
  239. <p class="phpdocumentor-summary">The buffer content</p>
  240. <code class="phpdocumentor-code phpdocumentor-signature ">
  241. <span class="phpdocumentor-signature__visibility">private</span>
  242. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  243. <span class="phpdocumentor-signature__name">$buffer</span>
  244. </code>
  245. </article>
  246. <article
  247. class="
  248. phpdocumentor-element
  249. -property
  250. -private
  251. "
  252. >
  253. <h4 class="phpdocumentor-element__name" id="property_bytesRead">
  254. $bytesRead
  255. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_bytesRead" class="headerlink"><i class="fas fa-link"></i></a>
  256. <span class="phpdocumentor-element__modifiers">
  257. </span>
  258. </h4>
  259. <aside class="phpdocumentor-element-found-in">
  260. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  261. :
  262. <span class="phpdocumentor-element-found-in__line">36</span>
  263. </aside>
  264. <p class="phpdocumentor-summary">Read count (bytes)</p>
  265. <code class="phpdocumentor-code phpdocumentor-signature ">
  266. <span class="phpdocumentor-signature__visibility">private</span>
  267. <span class="phpdocumentor-signature__type">int</span>
  268. <span class="phpdocumentor-signature__name">$bytesRead</span>
  269. = <span class="phpdocumentor-signature__default-value">0</span></code>
  270. <section class="phpdocumentor-description"></section>
  271. </article>
  272. <article
  273. class="
  274. phpdocumentor-element
  275. -property
  276. -private
  277. "
  278. >
  279. <h4 class="phpdocumentor-element__name" id="property_length">
  280. $length
  281. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  282. <span class="phpdocumentor-element__modifiers">
  283. </span>
  284. </h4>
  285. <aside class="phpdocumentor-element-found-in">
  286. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  287. :
  288. <span class="phpdocumentor-element-found-in__line">31</span>
  289. </aside>
  290. <p class="phpdocumentor-summary">Length of the content (bits)</p>
  291. <code class="phpdocumentor-code phpdocumentor-signature ">
  292. <span class="phpdocumentor-signature__visibility">private</span>
  293. <span class="phpdocumentor-signature__type">int</span>
  294. <span class="phpdocumentor-signature__name">$length</span>
  295. </code>
  296. <section class="phpdocumentor-description"></section>
  297. </article>
  298. </section>
  299. <section class="phpdocumentor-methods">
  300. <h3 class="phpdocumentor-elements__header" id="methods">
  301. Methods
  302. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  303. </h3>
  304. <article
  305. class="phpdocumentor-element
  306. -method
  307. -public
  308. "
  309. >
  310. <h4 class="phpdocumentor-element__name" id="method___construct">
  311. __construct()
  312. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  313. </h4>
  314. <aside class="phpdocumentor-element-found-in">
  315. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  316. :
  317. <span class="phpdocumentor-element-found-in__line">48</span>
  318. </aside>
  319. <p class="phpdocumentor-summary">BitBuffer constructor.</p>
  320. <code class="phpdocumentor-code phpdocumentor-signature ">
  321. <span class="phpdocumentor-signature__visibility">public</span>
  322. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bytes</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  323. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  324. <dl class="phpdocumentor-argument-list">
  325. <dt class="phpdocumentor-argument-list__entry">
  326. <span class="phpdocumentor-signature__argument__name">$bytes</span>
  327. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;|null</span>
  328. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  329. <dd class="phpdocumentor-argument-list__definition">
  330. </dd>
  331. </dl>
  332. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  333. <span class="phpdocumentor-signature__response_type">mixed</span>
  334. &mdash;
  335. </article>
  336. <article
  337. class="phpdocumentor-element
  338. -method
  339. -public
  340. "
  341. >
  342. <h4 class="phpdocumentor-element__name" id="method_available">
  343. available()
  344. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_available" class="headerlink"><i class="fas fa-link"></i></a>
  345. </h4>
  346. <aside class="phpdocumentor-element-found-in">
  347. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  348. :
  349. <span class="phpdocumentor-element-found-in__line">101</span>
  350. </aside>
  351. <code class="phpdocumentor-code phpdocumentor-signature ">
  352. <span class="phpdocumentor-signature__visibility">public</span>
  353. <span class="phpdocumentor-signature__name">available</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  354. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  355. <span class="phpdocumentor-signature__response_type">int</span>
  356. &mdash;
  357. <section class="phpdocumentor-description"><p>number of bits that can be read successfully</p>
  358. </section>
  359. </article>
  360. <article
  361. class="phpdocumentor-element
  362. -method
  363. -public
  364. "
  365. >
  366. <h4 class="phpdocumentor-element__name" id="method_clear">
  367. clear()
  368. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_clear" class="headerlink"><i class="fas fa-link"></i></a>
  369. </h4>
  370. <aside class="phpdocumentor-element-found-in">
  371. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  372. :
  373. <span class="phpdocumentor-element-found-in__line">161</span>
  374. </aside>
  375. <p class="phpdocumentor-summary">Clears the buffer and resets the stats</p>
  376. <code class="phpdocumentor-code phpdocumentor-signature ">
  377. <span class="phpdocumentor-signature__visibility">public</span>
  378. <span class="phpdocumentor-signature__name">clear</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
  379. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  380. <span class="phpdocumentor-signature__response_type">self</span>
  381. &mdash;
  382. </article>
  383. <article
  384. class="phpdocumentor-element
  385. -method
  386. -public
  387. "
  388. >
  389. <h4 class="phpdocumentor-element__name" id="method_getBuffer">
  390. getBuffer()
  391. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_getBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  392. </h4>
  393. <aside class="phpdocumentor-element-found-in">
  394. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  395. :
  396. <span class="phpdocumentor-element-found-in__line">94</span>
  397. </aside>
  398. <p class="phpdocumentor-summary">returns the buffer content</p>
  399. <code class="phpdocumentor-code phpdocumentor-signature ">
  400. <span class="phpdocumentor-signature__visibility">public</span>
  401. <span class="phpdocumentor-signature__name">getBuffer</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  402. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  403. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  404. &mdash;
  405. </article>
  406. <article
  407. class="phpdocumentor-element
  408. -method
  409. -public
  410. "
  411. >
  412. <h4 class="phpdocumentor-element__name" id="method_getLength">
  413. getLength()
  414. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_getLength" class="headerlink"><i class="fas fa-link"></i></a>
  415. </h4>
  416. <aside class="phpdocumentor-element-found-in">
  417. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  418. :
  419. <span class="phpdocumentor-element-found-in__line">87</span>
  420. </aside>
  421. <p class="phpdocumentor-summary">returns the current buffer length</p>
  422. <code class="phpdocumentor-code phpdocumentor-signature ">
  423. <span class="phpdocumentor-signature__visibility">public</span>
  424. <span class="phpdocumentor-signature__name">getLength</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  425. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  426. <span class="phpdocumentor-signature__response_type">int</span>
  427. &mdash;
  428. </article>
  429. <article
  430. class="phpdocumentor-element
  431. -method
  432. -public
  433. "
  434. >
  435. <h4 class="phpdocumentor-element__name" id="method_put">
  436. put()
  437. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_put" class="headerlink"><i class="fas fa-link"></i></a>
  438. </h4>
  439. <aside class="phpdocumentor-element-found-in">
  440. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  441. :
  442. <span class="phpdocumentor-element-found-in__line">56</span>
  443. </aside>
  444. <p class="phpdocumentor-summary">appends a sequence of bits</p>
  445. <code class="phpdocumentor-code phpdocumentor-signature ">
  446. <span class="phpdocumentor-signature__visibility">public</span>
  447. <span class="phpdocumentor-signature__name">put</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bits</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">$length</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
  448. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  449. <dl class="phpdocumentor-argument-list">
  450. <dt class="phpdocumentor-argument-list__entry">
  451. <span class="phpdocumentor-signature__argument__name">$bits</span>
  452. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  453. </dt>
  454. <dd class="phpdocumentor-argument-list__definition">
  455. <section class="phpdocumentor-description"></section>
  456. </dd>
  457. <dt class="phpdocumentor-argument-list__entry">
  458. <span class="phpdocumentor-signature__argument__name">$length</span>
  459. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  460. </dt>
  461. <dd class="phpdocumentor-argument-list__definition">
  462. <section class="phpdocumentor-description"></section>
  463. </dd>
  464. </dl>
  465. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  466. <span class="phpdocumentor-signature__response_type">self</span>
  467. &mdash;
  468. </article>
  469. <article
  470. class="phpdocumentor-element
  471. -method
  472. -public
  473. "
  474. >
  475. <h4 class="phpdocumentor-element__name" id="method_putBit">
  476. putBit()
  477. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_putBit" class="headerlink"><i class="fas fa-link"></i></a>
  478. </h4>
  479. <aside class="phpdocumentor-element-found-in">
  480. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  481. :
  482. <span class="phpdocumentor-element-found-in__line">68</span>
  483. </aside>
  484. <p class="phpdocumentor-summary">appends a single bit</p>
  485. <code class="phpdocumentor-code phpdocumentor-signature ">
  486. <span class="phpdocumentor-signature__visibility">public</span>
  487. <span class="phpdocumentor-signature__name">putBit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bit</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</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">$bit</span>
  492. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  493. </dt>
  494. <dd class="phpdocumentor-argument-list__definition">
  495. <section class="phpdocumentor-description"></section>
  496. </dd>
  497. </dl>
  498. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  499. <span class="phpdocumentor-signature__response_type">self</span>
  500. &mdash;
  501. </article>
  502. <article
  503. class="phpdocumentor-element
  504. -method
  505. -public
  506. "
  507. >
  508. <h4 class="phpdocumentor-element__name" id="method_read">
  509. read()
  510. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_read" class="headerlink"><i class="fas fa-link"></i></a>
  511. </h4>
  512. <aside class="phpdocumentor-element-found-in">
  513. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  514. :
  515. <span class="phpdocumentor-element-found-in__line">113</span>
  516. </aside>
  517. <code class="phpdocumentor-code phpdocumentor-signature ">
  518. <span class="phpdocumentor-signature__visibility">public</span>
  519. <span class="phpdocumentor-signature__name">read</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$numBits</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  520. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  521. <dl class="phpdocumentor-argument-list">
  522. <dt class="phpdocumentor-argument-list__entry">
  523. <span class="phpdocumentor-signature__argument__name">$numBits</span>
  524. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  525. </dt>
  526. <dd class="phpdocumentor-argument-list__definition">
  527. <section class="phpdocumentor-description"><p>number of bits to read</p>
  528. </section>
  529. </dd>
  530. </dl>
  531. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  532. Tags
  533. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  534. </h5>
  535. <dl class="phpdocumentor-tag-list">
  536. <dt class="phpdocumentor-tag-list__entry">
  537. <span class="phpdocumentor-tag__name">author</span>
  538. </dt>
  539. <dd class="phpdocumentor-tag-list__definition">
  540. <section class="phpdocumentor-description"><p>Sean Owen, ZXing</p>
  541. </section>
  542. </dd>
  543. <dt class="phpdocumentor-tag-list__entry">
  544. <span class="phpdocumentor-tag__name">throws</span>
  545. </dt>
  546. <dd class="phpdocumentor-tag-list__definition">
  547. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  548. <section class="phpdocumentor-description"><p>if numBits isn't in [1,32] or more than is available</p>
  549. </section>
  550. </dd>
  551. </dl>
  552. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  553. <span class="phpdocumentor-signature__response_type">int</span>
  554. &mdash;
  555. <section class="phpdocumentor-description"><p>representing the bits read. The bits will appear as the least-significant bits of the int</p>
  556. </section>
  557. </article>
  558. <article
  559. class="phpdocumentor-element
  560. -method
  561. -public
  562. "
  563. >
  564. <h4 class="phpdocumentor-element__name" id="method_rewind">
  565. rewind()
  566. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#method_rewind" class="headerlink"><i class="fas fa-link"></i></a>
  567. </h4>
  568. <aside class="phpdocumentor-element-found-in">
  569. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/BitBuffer.php"><a href="files/src-common-bitbuffer.html"><abbr title="src/Common/BitBuffer.php">BitBuffer.php</abbr></a></abbr>
  570. :
  571. <span class="phpdocumentor-element-found-in__line">171</span>
  572. </aside>
  573. <p class="phpdocumentor-summary">Resets the read-counters</p>
  574. <code class="phpdocumentor-code phpdocumentor-signature ">
  575. <span class="phpdocumentor-signature__visibility">public</span>
  576. <span class="phpdocumentor-signature__name">rewind</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
  577. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  578. <span class="phpdocumentor-signature__response_type">self</span>
  579. &mdash;
  580. </article>
  581. </section>
  582. <script type="text/javascript">
  583. function loadExternalCodeSnippets(line) {
  584. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  585. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  586. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  587. var language = 'php';
  588. var code = document.createElement('code');
  589. code.className = 'language-' + language;
  590. pre.textContent = '';
  591. pre.setAttribute('data-line', line)
  592. code.textContent = 'Loading…';
  593. pre.appendChild(code);
  594. var xhr = new XMLHttpRequest();
  595. xhr.open('GET', src, true);
  596. xhr.onreadystatechange = function () {
  597. if (xhr.readyState == 4) {
  598. if (xhr.status < 400 && xhr.responseText) {
  599. code.textContent = xhr.responseText;
  600. Prism.highlightElement(code);
  601. }
  602. else if (xhr.status >= 400) {
  603. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  604. }
  605. else {
  606. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  607. }
  608. }
  609. };
  610. xhr.send(null);
  611. });
  612. }
  613. var modals = document.querySelectorAll("[data-modal]");
  614. modals.forEach(function (trigger) {
  615. trigger.addEventListener("click", function (event) {
  616. //event.preventDefault();
  617. const modal = document.getElementById(trigger.dataset.modal);
  618. modal.classList.add("phpdocumentor-modal__open");
  619. loadExternalCodeSnippets(trigger.dataset.line)
  620. const exits = modal.querySelectorAll("[data-exit-button]");
  621. exits.forEach(function (exit) {
  622. exit.addEventListener("click", function (event) {
  623. event.preventDefault();
  624. modal.classList.remove("phpdocumentor-modal__open");
  625. });
  626. });
  627. });
  628. });
  629. </script>
  630. </article>
  631. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  632. <section class="phpdocumentor-search-results__dialog">
  633. <header class="phpdocumentor-search-results__header">
  634. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  635. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  636. </header>
  637. <section class="phpdocumentor-search-results__body">
  638. <ul class="phpdocumentor-search-results__entries"></ul>
  639. </section>
  640. </section>
  641. </section>
  642. </div>
  643. </div>
  644. <a href="classes/chillerlan-QRCode-Common-BitBuffer.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  645. </main>
  646. <script>
  647. cssVars({});
  648. </script>
  649. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  650. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  651. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  652. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  653. </body>
  654. </html>