chillerlan-QRCode-Data-QRData.html 41 KB

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