chillerlan-QRCode-Data-QRData.html 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  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-data.html">Data</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. QRData
  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/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  102. :
  103. <span class="phpdocumentor-element-found-in__line">21</span>
  104. </aside>
  105. <p class="phpdocumentor-summary">Processes the binary data and maps it on a QRMatrix which is then being returned</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-Data-QRData.html#property_bitBuffer">$bitBuffer</a>
  113. <span>
  114. &nbsp;: <a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a> </span>
  115. </dt>
  116. <dd>a BitBuffer instance</dd>
  117. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  118. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_dataSegments">$dataSegments</a>
  119. <span>
  120. &nbsp;: array&lt;string|int, mixed&gt; </span>
  121. </dt>
  122. <dd></dd>
  123. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  124. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_eccLevel">$eccLevel</a>
  125. <span>
  126. &nbsp;: <a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a> </span>
  127. </dt>
  128. <dd>an EccLevel instance</dd>
  129. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  130. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_maxBitsForEcc">$maxBitsForEcc</a>
  131. <span>
  132. &nbsp;: array&lt;string|int, mixed&gt; </span>
  133. </dt>
  134. <dd>Max bits for the current ECC mode</dd>
  135. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  136. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_options">$options</a>
  137. <span>
  138. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  139. </dt>
  140. <dd>the options instance</dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  142. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_version">$version</a>
  143. <span>
  144. &nbsp;: <a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a> </span>
  145. </dt>
  146. <dd>current QR Code version</dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  148. <a href="classes/chillerlan-QRCode-Data-QRData.html#method___construct">__construct()</a>
  149. <span>
  150. &nbsp;: mixed </span>
  151. </dt>
  152. <dd>QRData constructor.</dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  154. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getBitBuffer">getBitBuffer()</a>
  155. <span>
  156. &nbsp;: <a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a> </span>
  157. </dt>
  158. <dd>Returns the current BitBuffer instance</dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setBitBuffer">setBitBuffer()</a>
  161. <span>
  162. &nbsp;: self </span>
  163. </dt>
  164. <dd>Sets a BitBuffer object</dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setData">setData()</a>
  167. <span>
  168. &nbsp;: self </span>
  169. </dt>
  170. <dd>Sets the data string (internally called by the constructor)</dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  172. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeMatrix">writeMatrix()</a>
  173. <span>
  174. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  175. </dt>
  176. <dd>returns a fresh matrix object with the data written and masked with the given $maskPattern</dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  178. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_estimateTotalBitLength">estimateTotalBitLength()</a>
  179. <span>
  180. &nbsp;: int </span>
  181. </dt>
  182. <dd>estimates the total length of the several mode segments in order to guess the minimum version</dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  184. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getMinimumVersion">getMinimumVersion()</a>
  185. <span>
  186. &nbsp;: <a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a> </span>
  187. </dt>
  188. <dd>returns the minimum version number for the given string</dd>
  189. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  190. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeBitBuffer">writeBitBuffer()</a>
  191. <span>
  192. &nbsp;: void </span>
  193. </dt>
  194. <dd>creates a BitBuffer and writes the string data to it</dd>
  195. </dl>
  196. <section class="phpdocumentor-properties">
  197. <h3 class="phpdocumentor-elements__header" id="properties">
  198. Properties
  199. <a href="classes/chillerlan-QRCode-Data-QRData.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  200. </h3>
  201. <article
  202. class="
  203. phpdocumentor-element
  204. -property
  205. -private
  206. "
  207. >
  208. <h4 class="phpdocumentor-element__name" id="property_bitBuffer">
  209. $bitBuffer
  210. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_bitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  211. <span class="phpdocumentor-element__modifiers">
  212. </span>
  213. </h4>
  214. <aside class="phpdocumentor-element-found-in">
  215. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  216. :
  217. <span class="phpdocumentor-element-found-in__line">33</span>
  218. </aside>
  219. <p class="phpdocumentor-summary">a BitBuffer instance</p>
  220. <code class="phpdocumentor-code phpdocumentor-signature ">
  221. <span class="phpdocumentor-signature__visibility">private</span>
  222. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  223. <span class="phpdocumentor-signature__name">$bitBuffer</span>
  224. </code>
  225. <section class="phpdocumentor-description"></section>
  226. </article>
  227. <article
  228. class="
  229. phpdocumentor-element
  230. -property
  231. -private
  232. "
  233. >
  234. <h4 class="phpdocumentor-element__name" id="property_dataSegments">
  235. $dataSegments
  236. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_dataSegments" class="headerlink"><i class="fas fa-link"></i></a>
  237. <span class="phpdocumentor-element__modifiers">
  238. </span>
  239. </h4>
  240. <aside class="phpdocumentor-element-found-in">
  241. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  242. :
  243. <span class="phpdocumentor-element-found-in__line">48</span>
  244. </aside>
  245. <code class="phpdocumentor-code phpdocumentor-signature ">
  246. <span class="phpdocumentor-signature__visibility">private</span>
  247. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  248. <span class="phpdocumentor-signature__name">$dataSegments</span>
  249. = <span class="phpdocumentor-signature__default-value">[]</span></code>
  250. </article>
  251. <article
  252. class="
  253. phpdocumentor-element
  254. -property
  255. -private
  256. "
  257. >
  258. <h4 class="phpdocumentor-element__name" id="property_eccLevel">
  259. $eccLevel
  260. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_eccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  261. <span class="phpdocumentor-element__modifiers">
  262. </span>
  263. </h4>
  264. <aside class="phpdocumentor-element-found-in">
  265. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  266. :
  267. <span class="phpdocumentor-element-found-in__line">38</span>
  268. </aside>
  269. <p class="phpdocumentor-summary">an EccLevel instance</p>
  270. <code class="phpdocumentor-code phpdocumentor-signature ">
  271. <span class="phpdocumentor-signature__visibility">private</span>
  272. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a></span>
  273. <span class="phpdocumentor-signature__name">$eccLevel</span>
  274. </code>
  275. <section class="phpdocumentor-description"></section>
  276. </article>
  277. <article
  278. class="
  279. phpdocumentor-element
  280. -property
  281. -private
  282. "
  283. >
  284. <h4 class="phpdocumentor-element__name" id="property_maxBitsForEcc">
  285. $maxBitsForEcc
  286. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_maxBitsForEcc" class="headerlink"><i class="fas fa-link"></i></a>
  287. <span class="phpdocumentor-element__modifiers">
  288. </span>
  289. </h4>
  290. <aside class="phpdocumentor-element-found-in">
  291. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  292. :
  293. <span class="phpdocumentor-element-found-in__line">55</span>
  294. </aside>
  295. <p class="phpdocumentor-summary">Max bits for the current ECC mode</p>
  296. <code class="phpdocumentor-code phpdocumentor-signature ">
  297. <span class="phpdocumentor-signature__visibility">private</span>
  298. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  299. <span class="phpdocumentor-signature__name">$maxBitsForEcc</span>
  300. </code>
  301. </article>
  302. <article
  303. class="
  304. phpdocumentor-element
  305. -property
  306. -private
  307. "
  308. >
  309. <h4 class="phpdocumentor-element__name" id="property_options">
  310. $options
  311. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  312. <span class="phpdocumentor-element__modifiers">
  313. </span>
  314. </h4>
  315. <aside class="phpdocumentor-element-found-in">
  316. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  317. :
  318. <span class="phpdocumentor-element-found-in__line">28</span>
  319. </aside>
  320. <p class="phpdocumentor-summary">the options instance</p>
  321. <code class="phpdocumentor-code phpdocumentor-signature ">
  322. <span class="phpdocumentor-signature__visibility">private</span>
  323. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  324. <span class="phpdocumentor-signature__name">$options</span>
  325. </code>
  326. </article>
  327. <article
  328. class="
  329. phpdocumentor-element
  330. -property
  331. -private
  332. "
  333. >
  334. <h4 class="phpdocumentor-element__name" id="property_version">
  335. $version
  336. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_version" class="headerlink"><i class="fas fa-link"></i></a>
  337. <span class="phpdocumentor-element__modifiers">
  338. </span>
  339. </h4>
  340. <aside class="phpdocumentor-element-found-in">
  341. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  342. :
  343. <span class="phpdocumentor-element-found-in__line">43</span>
  344. </aside>
  345. <p class="phpdocumentor-summary">current QR Code version</p>
  346. <code class="phpdocumentor-code phpdocumentor-signature ">
  347. <span class="phpdocumentor-signature__visibility">private</span>
  348. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  349. <span class="phpdocumentor-signature__name">$version</span>
  350. </code>
  351. <section class="phpdocumentor-description"></section>
  352. </article>
  353. </section>
  354. <section class="phpdocumentor-methods">
  355. <h3 class="phpdocumentor-elements__header" id="methods">
  356. Methods
  357. <a href="classes/chillerlan-QRCode-Data-QRData.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  358. </h3>
  359. <article
  360. class="phpdocumentor-element
  361. -method
  362. -public
  363. "
  364. >
  365. <h4 class="phpdocumentor-element__name" id="method___construct">
  366. __construct()
  367. <a href="classes/chillerlan-QRCode-Data-QRData.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  368. </h4>
  369. <aside class="phpdocumentor-element-found-in">
  370. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  371. :
  372. <span class="phpdocumentor-element-found-in__line">63</span>
  373. </aside>
  374. <p class="phpdocumentor-summary">QRData constructor.</p>
  375. <code class="phpdocumentor-code phpdocumentor-signature ">
  376. <span class="phpdocumentor-signature__visibility">public</span>
  377. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a>&gt;|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$dataSegments</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>
  378. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  379. <dl class="phpdocumentor-argument-list">
  380. <dt class="phpdocumentor-argument-list__entry">
  381. <span class="phpdocumentor-signature__argument__name">$options</span>
  382. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  383. </dt>
  384. <dd class="phpdocumentor-argument-list__definition">
  385. </dd>
  386. <dt class="phpdocumentor-argument-list__entry">
  387. <span class="phpdocumentor-signature__argument__name">$dataSegments</span>
  388. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a>&gt;|null</span>
  389. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  390. <dd class="phpdocumentor-argument-list__definition">
  391. </dd>
  392. </dl>
  393. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  394. <span class="phpdocumentor-signature__response_type">mixed</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_getBitBuffer">
  404. getBitBuffer()
  405. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getBitBuffer" 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/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  409. :
  410. <span class="phpdocumentor-element-found-in__line">95</span>
  411. </aside>
  412. <p class="phpdocumentor-summary">Returns the current BitBuffer instance</p>
  413. <code class="phpdocumentor-code phpdocumentor-signature ">
  414. <span class="phpdocumentor-signature__visibility">public</span>
  415. <span class="phpdocumentor-signature__name">getBitBuffer</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span></code>
  416. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  417. Tags
  418. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  419. </h5>
  420. <dl class="phpdocumentor-tag-list">
  421. <dt class="phpdocumentor-tag-list__entry">
  422. <span class="phpdocumentor-tag__name">codeCoverageIgnore</span>
  423. </dt>
  424. <dd class="phpdocumentor-tag-list__definition">
  425. </dd>
  426. </dl>
  427. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  428. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  429. &mdash;
  430. </article>
  431. <article
  432. class="phpdocumentor-element
  433. -method
  434. -public
  435. "
  436. >
  437. <h4 class="phpdocumentor-element__name" id="method_setBitBuffer">
  438. setBitBuffer()
  439. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setBitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  440. </h4>
  441. <aside class="phpdocumentor-element-found-in">
  442. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  443. :
  444. <span class="phpdocumentor-element-found-in__line">108</span>
  445. </aside>
  446. <p class="phpdocumentor-summary">Sets a BitBuffer object</p>
  447. <code class="phpdocumentor-code phpdocumentor-signature ">
  448. <span class="phpdocumentor-signature__visibility">public</span>
  449. <span class="phpdocumentor-signature__name">setBitBuffer</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bitBuffer</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
  450. <section class="phpdocumentor-description"><p>This can be used instead of setData(), however, the version auto-detection is not available in this case.
  451. The version needs match the length bits range for the data mode the data has been encoded with,
  452. additionally the bit array needs to contain enough pad bits.</p>
  453. </section>
  454. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  455. <dl class="phpdocumentor-argument-list">
  456. <dt class="phpdocumentor-argument-list__entry">
  457. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  458. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  459. </dt>
  460. <dd class="phpdocumentor-argument-list__definition">
  461. <section class="phpdocumentor-description"></section>
  462. </dd>
  463. </dl>
  464. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  465. Tags
  466. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  467. </h5>
  468. <dl class="phpdocumentor-tag-list">
  469. <dt class="phpdocumentor-tag-list__entry">
  470. <span class="phpdocumentor-tag__name">throws</span>
  471. </dt>
  472. <dd class="phpdocumentor-tag-list__definition">
  473. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  474. </dd>
  475. </dl>
  476. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  477. <span class="phpdocumentor-signature__response_type">self</span>
  478. &mdash;
  479. </article>
  480. <article
  481. class="phpdocumentor-element
  482. -method
  483. -public
  484. "
  485. >
  486. <h4 class="phpdocumentor-element__name" id="method_setData">
  487. setData()
  488. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setData" class="headerlink"><i class="fas fa-link"></i></a>
  489. </h4>
  490. <aside class="phpdocumentor-element-found-in">
  491. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  492. :
  493. <span class="phpdocumentor-element-found-in__line">80</span>
  494. </aside>
  495. <p class="phpdocumentor-summary">Sets the data string (internally called by the constructor)</p>
  496. <code class="phpdocumentor-code phpdocumentor-signature ">
  497. <span class="phpdocumentor-signature__visibility">public</span>
  498. <span class="phpdocumentor-signature__name">setData</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$dataSegments</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
  499. <section class="phpdocumentor-description"><p>Subsequent calls will overwrite the current state - use the QRCode::add*Segement() method instead</p>
  500. </section>
  501. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  502. <dl class="phpdocumentor-argument-list">
  503. <dt class="phpdocumentor-argument-list__entry">
  504. <span class="phpdocumentor-signature__argument__name">$dataSegments</span>
  505. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  506. </dt>
  507. <dd class="phpdocumentor-argument-list__definition">
  508. <section class="phpdocumentor-description"></section>
  509. </dd>
  510. </dl>
  511. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  512. <span class="phpdocumentor-signature__response_type">self</span>
  513. &mdash;
  514. </article>
  515. <article
  516. class="phpdocumentor-element
  517. -method
  518. -public
  519. "
  520. >
  521. <h4 class="phpdocumentor-element__name" id="method_writeMatrix">
  522. writeMatrix()
  523. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  524. </h4>
  525. <aside class="phpdocumentor-element-found-in">
  526. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  527. :
  528. <span class="phpdocumentor-element-found-in__line">128</span>
  529. </aside>
  530. <p class="phpdocumentor-summary">returns a fresh matrix object with the data written and masked with the given $maskPattern</p>
  531. <code class="phpdocumentor-code phpdocumentor-signature ">
  532. <span class="phpdocumentor-signature__visibility">public</span>
  533. <span class="phpdocumentor-signature__name">writeMatrix</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$maskPattern</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span></code>
  534. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  535. <dl class="phpdocumentor-argument-list">
  536. <dt class="phpdocumentor-argument-list__entry">
  537. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  538. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a></span>
  539. </dt>
  540. <dd class="phpdocumentor-argument-list__definition">
  541. <section class="phpdocumentor-description"></section>
  542. </dd>
  543. </dl>
  544. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  545. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  546. &mdash;
  547. </article>
  548. <article
  549. class="phpdocumentor-element
  550. -method
  551. -private
  552. "
  553. >
  554. <h4 class="phpdocumentor-element__name" id="method_estimateTotalBitLength">
  555. estimateTotalBitLength()
  556. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_estimateTotalBitLength" class="headerlink"><i class="fas fa-link"></i></a>
  557. </h4>
  558. <aside class="phpdocumentor-element-found-in">
  559. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  560. :
  561. <span class="phpdocumentor-element-found-in__line">141</span>
  562. </aside>
  563. <p class="phpdocumentor-summary">estimates the total length of the several mode segments in order to guess the minimum version</p>
  564. <code class="phpdocumentor-code phpdocumentor-signature ">
  565. <span class="phpdocumentor-signature__visibility">private</span>
  566. <span class="phpdocumentor-signature__name">estimateTotalBitLength</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  567. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  568. Tags
  569. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  570. </h5>
  571. <dl class="phpdocumentor-tag-list">
  572. <dt class="phpdocumentor-tag-list__entry">
  573. <span class="phpdocumentor-tag__name">throws</span>
  574. </dt>
  575. <dd class="phpdocumentor-tag-list__definition">
  576. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  577. </dd>
  578. </dl>
  579. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  580. <span class="phpdocumentor-signature__response_type">int</span>
  581. &mdash;
  582. </article>
  583. <article
  584. class="phpdocumentor-element
  585. -method
  586. -private
  587. "
  588. >
  589. <h4 class="phpdocumentor-element__name" id="method_getMinimumVersion">
  590. getMinimumVersion()
  591. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getMinimumVersion" class="headerlink"><i class="fas fa-link"></i></a>
  592. </h4>
  593. <aside class="phpdocumentor-element-found-in">
  594. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  595. :
  596. <span class="phpdocumentor-element-found-in__line">175</span>
  597. </aside>
  598. <p class="phpdocumentor-summary">returns the minimum version number for the given string</p>
  599. <code class="phpdocumentor-code phpdocumentor-signature ">
  600. <span class="phpdocumentor-signature__visibility">private</span>
  601. <span class="phpdocumentor-signature__name">getMinimumVersion</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span></code>
  602. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  603. Tags
  604. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  605. </h5>
  606. <dl class="phpdocumentor-tag-list">
  607. <dt class="phpdocumentor-tag-list__entry">
  608. <span class="phpdocumentor-tag__name">throws</span>
  609. </dt>
  610. <dd class="phpdocumentor-tag-list__definition">
  611. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  612. </dd>
  613. </dl>
  614. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  615. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  616. &mdash;
  617. </article>
  618. <article
  619. class="phpdocumentor-element
  620. -method
  621. -private
  622. "
  623. >
  624. <h4 class="phpdocumentor-element__name" id="method_writeBitBuffer">
  625. writeBitBuffer()
  626. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeBitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  627. </h4>
  628. <aside class="phpdocumentor-element-found-in">
  629. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  630. :
  631. <span class="phpdocumentor-element-found-in__line">199</span>
  632. </aside>
  633. <p class="phpdocumentor-summary">creates a BitBuffer and writes the string data to it</p>
  634. <code class="phpdocumentor-code phpdocumentor-signature ">
  635. <span class="phpdocumentor-signature__visibility">private</span>
  636. <span class="phpdocumentor-signature__name">writeBitBuffer</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  637. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  638. Tags
  639. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  640. </h5>
  641. <dl class="phpdocumentor-tag-list">
  642. <dt class="phpdocumentor-tag-list__entry">
  643. <span class="phpdocumentor-tag__name">throws</span>
  644. </dt>
  645. <dd class="phpdocumentor-tag-list__definition">
  646. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  647. <section class="phpdocumentor-description"><p>on data overflow</p>
  648. </section>
  649. </dd>
  650. </dl>
  651. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  652. <span class="phpdocumentor-signature__response_type">void</span>
  653. &mdash;
  654. </article>
  655. </section>
  656. <script type="text/javascript">
  657. function loadExternalCodeSnippets(line) {
  658. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  659. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  660. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  661. var language = 'php';
  662. var code = document.createElement('code');
  663. code.className = 'language-' + language;
  664. pre.textContent = '';
  665. pre.setAttribute('data-line', line)
  666. code.textContent = 'Loading…';
  667. pre.appendChild(code);
  668. var xhr = new XMLHttpRequest();
  669. xhr.open('GET', src, true);
  670. xhr.onreadystatechange = function () {
  671. if (xhr.readyState == 4) {
  672. if (xhr.status < 400 && xhr.responseText) {
  673. code.textContent = xhr.responseText;
  674. Prism.highlightElement(code);
  675. }
  676. else if (xhr.status >= 400) {
  677. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  678. }
  679. else {
  680. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  681. }
  682. }
  683. };
  684. xhr.send(null);
  685. });
  686. }
  687. var modals = document.querySelectorAll("[data-modal]");
  688. modals.forEach(function (trigger) {
  689. trigger.addEventListener("click", function (event) {
  690. //event.preventDefault();
  691. const modal = document.getElementById(trigger.dataset.modal);
  692. modal.classList.add("phpdocumentor-modal__open");
  693. loadExternalCodeSnippets(trigger.dataset.line)
  694. const exits = modal.querySelectorAll("[data-exit-button]");
  695. exits.forEach(function (exit) {
  696. exit.addEventListener("click", function (event) {
  697. event.preventDefault();
  698. modal.classList.remove("phpdocumentor-modal__open");
  699. });
  700. });
  701. });
  702. });
  703. </script>
  704. </article>
  705. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  706. <section class="phpdocumentor-search-results__dialog">
  707. <header class="phpdocumentor-search-results__header">
  708. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  709. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  710. </header>
  711. <section class="phpdocumentor-search-results__body">
  712. <ul class="phpdocumentor-search-results__entries"></ul>
  713. </section>
  714. </section>
  715. </section>
  716. </div>
  717. </div>
  718. <a href="classes/chillerlan-QRCode-Data-QRData.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  719. </main>
  720. <script>
  721. cssVars({});
  722. </script>
  723. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  724. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  725. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  726. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  727. </body>
  728. </html>