chillerlan-QRCode-Common-BitBuffer.html 34 KB

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