chillerlan-QRCode-Data-QRData.html 37 KB

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