chillerlan-QRCode-Data-QRData.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  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">97</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.</p>
  411. </section>
  412. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  413. <dl class="phpdocumentor-argument-list">
  414. <dt class="phpdocumentor-argument-list__entry">
  415. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  416. : <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>
  417. </dt>
  418. <dd class="phpdocumentor-argument-list__definition">
  419. <section class="phpdocumentor-description"></section>
  420. </dd>
  421. </dl>
  422. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  423. Tags
  424. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  425. </h5>
  426. <dl class="phpdocumentor-tag-list">
  427. <dt class="phpdocumentor-tag-list__entry">
  428. <span class="phpdocumentor-tag__name">throws</span>
  429. </dt>
  430. <dd class="phpdocumentor-tag-list__definition">
  431. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  432. </dd>
  433. </dl>
  434. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  435. <span class="phpdocumentor-signature__response_type">self</span>
  436. &mdash;
  437. </article>
  438. <article
  439. class="phpdocumentor-element
  440. -method
  441. -public
  442. "
  443. >
  444. <h4 class="phpdocumentor-element__name" id="method_setData">
  445. setData()
  446. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setData" class="headerlink"><i class="fas fa-link"></i></a>
  447. </h4>
  448. <aside class="phpdocumentor-element-found-in">
  449. <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>
  450. :
  451. <span class="phpdocumentor-element-found-in__line">80</span>
  452. </aside>
  453. <p class="phpdocumentor-summary">Sets the data string (internally called by the constructor)</p>
  454. <code class="phpdocumentor-code phpdocumentor-signature ">
  455. <span class="phpdocumentor-signature__visibility">public</span>
  456. <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>
  457. <section class="phpdocumentor-description"><p>Subsequent calls will overwrite the current state - use the QRCode::add*Segement() method instead</p>
  458. </section>
  459. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  460. <dl class="phpdocumentor-argument-list">
  461. <dt class="phpdocumentor-argument-list__entry">
  462. <span class="phpdocumentor-signature__argument__name">$dataSegments</span>
  463. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  464. </dt>
  465. <dd class="phpdocumentor-argument-list__definition">
  466. <section class="phpdocumentor-description"></section>
  467. </dd>
  468. </dl>
  469. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  470. <span class="phpdocumentor-signature__response_type">self</span>
  471. &mdash;
  472. </article>
  473. <article
  474. class="phpdocumentor-element
  475. -method
  476. -public
  477. "
  478. >
  479. <h4 class="phpdocumentor-element__name" id="method_writeMatrix">
  480. writeMatrix()
  481. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  482. </h4>
  483. <aside class="phpdocumentor-element-found-in">
  484. <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>
  485. :
  486. <span class="phpdocumentor-element-found-in__line">117</span>
  487. </aside>
  488. <p class="phpdocumentor-summary">returns a fresh matrix object with the data written and masked with the given $maskPattern</p>
  489. <code class="phpdocumentor-code phpdocumentor-signature ">
  490. <span class="phpdocumentor-signature__visibility">public</span>
  491. <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>
  492. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  493. <dl class="phpdocumentor-argument-list">
  494. <dt class="phpdocumentor-argument-list__entry">
  495. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  496. : <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>
  497. </dt>
  498. <dd class="phpdocumentor-argument-list__definition">
  499. <section class="phpdocumentor-description"></section>
  500. </dd>
  501. </dl>
  502. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  503. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  504. &mdash;
  505. </article>
  506. <article
  507. class="phpdocumentor-element
  508. -method
  509. -private
  510. "
  511. >
  512. <h4 class="phpdocumentor-element__name" id="method_estimateTotalBitLength">
  513. estimateTotalBitLength()
  514. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_estimateTotalBitLength" class="headerlink"><i class="fas fa-link"></i></a>
  515. </h4>
  516. <aside class="phpdocumentor-element-found-in">
  517. <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>
  518. :
  519. <span class="phpdocumentor-element-found-in__line">130</span>
  520. </aside>
  521. <p class="phpdocumentor-summary">estimates the total length of the several mode segments in order to guess the minimum version</p>
  522. <code class="phpdocumentor-code phpdocumentor-signature ">
  523. <span class="phpdocumentor-signature__visibility">private</span>
  524. <span class="phpdocumentor-signature__name">estimateTotalBitLength</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  525. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  526. Tags
  527. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  528. </h5>
  529. <dl class="phpdocumentor-tag-list">
  530. <dt class="phpdocumentor-tag-list__entry">
  531. <span class="phpdocumentor-tag__name">throws</span>
  532. </dt>
  533. <dd class="phpdocumentor-tag-list__definition">
  534. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  535. </dd>
  536. </dl>
  537. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  538. <span class="phpdocumentor-signature__response_type">int</span>
  539. &mdash;
  540. </article>
  541. <article
  542. class="phpdocumentor-element
  543. -method
  544. -private
  545. "
  546. >
  547. <h4 class="phpdocumentor-element__name" id="method_getMinimumVersion">
  548. getMinimumVersion()
  549. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getMinimumVersion" class="headerlink"><i class="fas fa-link"></i></a>
  550. </h4>
  551. <aside class="phpdocumentor-element-found-in">
  552. <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>
  553. :
  554. <span class="phpdocumentor-element-found-in__line">164</span>
  555. </aside>
  556. <p class="phpdocumentor-summary">returns the minimum version number for the given string</p>
  557. <code class="phpdocumentor-code phpdocumentor-signature ">
  558. <span class="phpdocumentor-signature__visibility">private</span>
  559. <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>
  560. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  561. Tags
  562. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  563. </h5>
  564. <dl class="phpdocumentor-tag-list">
  565. <dt class="phpdocumentor-tag-list__entry">
  566. <span class="phpdocumentor-tag__name">throws</span>
  567. </dt>
  568. <dd class="phpdocumentor-tag-list__definition">
  569. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  570. </dd>
  571. </dl>
  572. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  573. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  574. &mdash;
  575. </article>
  576. <article
  577. class="phpdocumentor-element
  578. -method
  579. -private
  580. "
  581. >
  582. <h4 class="phpdocumentor-element__name" id="method_writeBitBuffer">
  583. writeBitBuffer()
  584. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeBitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  585. </h4>
  586. <aside class="phpdocumentor-element-found-in">
  587. <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>
  588. :
  589. <span class="phpdocumentor-element-found-in__line">188</span>
  590. </aside>
  591. <p class="phpdocumentor-summary">creates a BitBuffer and writes the string data to it</p>
  592. <code class="phpdocumentor-code phpdocumentor-signature ">
  593. <span class="phpdocumentor-signature__visibility">private</span>
  594. <span class="phpdocumentor-signature__name">writeBitBuffer</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  595. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  596. Tags
  597. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  598. </h5>
  599. <dl class="phpdocumentor-tag-list">
  600. <dt class="phpdocumentor-tag-list__entry">
  601. <span class="phpdocumentor-tag__name">throws</span>
  602. </dt>
  603. <dd class="phpdocumentor-tag-list__definition">
  604. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  605. <section class="phpdocumentor-description"><p>on data overflow</p>
  606. </section>
  607. </dd>
  608. </dl>
  609. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  610. <span class="phpdocumentor-signature__response_type">void</span>
  611. &mdash;
  612. </article>
  613. </section>
  614. <script type="text/javascript">
  615. function loadExternalCodeSnippets(line) {
  616. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  617. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  618. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  619. var language = 'php';
  620. var code = document.createElement('code');
  621. code.className = 'language-' + language;
  622. pre.textContent = '';
  623. pre.setAttribute('data-line', line)
  624. code.textContent = 'Loading…';
  625. pre.appendChild(code);
  626. var xhr = new XMLHttpRequest();
  627. xhr.open('GET', src, true);
  628. xhr.onreadystatechange = function () {
  629. if (xhr.readyState == 4) {
  630. if (xhr.status < 400 && xhr.responseText) {
  631. code.textContent = xhr.responseText;
  632. Prism.highlightElement(code);
  633. }
  634. else if (xhr.status >= 400) {
  635. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  636. }
  637. else {
  638. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  639. }
  640. }
  641. };
  642. xhr.send(null);
  643. });
  644. }
  645. var modals = document.querySelectorAll("[data-modal]");
  646. modals.forEach(function (trigger) {
  647. trigger.addEventListener("click", function (event) {
  648. //event.preventDefault();
  649. const modal = document.getElementById(trigger.dataset.modal);
  650. modal.classList.add("phpdocumentor-modal__open");
  651. loadExternalCodeSnippets(trigger.dataset.line)
  652. const exits = modal.querySelectorAll("[data-exit-button]");
  653. exits.forEach(function (exit) {
  654. exit.addEventListener("click", function (event) {
  655. event.preventDefault();
  656. modal.classList.remove("phpdocumentor-modal__open");
  657. });
  658. });
  659. });
  660. });
  661. </script>
  662. </article>
  663. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  664. <section class="phpdocumentor-search-results__dialog">
  665. <header class="phpdocumentor-search-results__header">
  666. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  667. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  668. </header>
  669. <section class="phpdocumentor-search-results__body">
  670. <ul class="phpdocumentor-search-results__entries"></ul>
  671. </section>
  672. </section>
  673. </section>
  674. </div>
  675. </div>
  676. <a href="classes/chillerlan-QRCode-Data-QRData.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  677. </main>
  678. <script>
  679. cssVars({});
  680. </script>
  681. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  682. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  683. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  684. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  685. </body>
  686. </html>