chillerlan-QRCode-Common-BitBuffer.html 33 KB

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