chillerlan-QRCode-Data-QRData.html 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-data.html">Data</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. QRData
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">22</span>
  100. </aside>
  101. <p class="phpdocumentor-summary">Processes the binary data and maps it on a matrix which is then being returned</p>
  102. <h3 id="toc">
  103. Table of Contents
  104. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  105. </h3>
  106. <dl class="phpdocumentor-table-of-contents">
  107. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  108. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_bitBuffer">$bitBuffer</a>
  109. <span>
  110. &nbsp;: <a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a> </span>
  111. </dt>
  112. <dd>a BitBuffer instance</dd>
  113. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  114. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_dataSegments">$dataSegments</a>
  115. <span>
  116. &nbsp;: array&lt;string|int, mixed&gt; </span>
  117. </dt>
  118. <dd></dd>
  119. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  120. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_eccLevel">$eccLevel</a>
  121. <span>
  122. &nbsp;: <a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a> </span>
  123. </dt>
  124. <dd>an EccLevel instance</dd>
  125. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  126. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_maxBitsForEcc">$maxBitsForEcc</a>
  127. <span>
  128. &nbsp;: array&lt;string|int, mixed&gt; </span>
  129. </dt>
  130. <dd>Max bits for the current ECC mode</dd>
  131. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  132. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_options">$options</a>
  133. <span>
  134. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  135. </dt>
  136. <dd>the options instance</dd>
  137. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  138. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_version">$version</a>
  139. <span>
  140. &nbsp;: <a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a> </span>
  141. </dt>
  142. <dd>current QR Code version</dd>
  143. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  144. <a href="classes/chillerlan-QRCode-Data-QRData.html#method___construct">__construct()</a>
  145. <span>
  146. &nbsp;: mixed </span>
  147. </dt>
  148. <dd>QRData constructor.</dd>
  149. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  150. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setData">setData()</a>
  151. <span>
  152. &nbsp;: self </span>
  153. </dt>
  154. <dd>Sets the data string (internally called by the constructor)</dd>
  155. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  156. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeMatrix">writeMatrix()</a>
  157. <span>
  158. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  159. </dt>
  160. <dd>returns a fresh matrix object with the data written for the given $maskPattern</dd>
  161. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  162. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_estimateTotalBitLength">estimateTotalBitLength()</a>
  163. <span>
  164. &nbsp;: int </span>
  165. </dt>
  166. <dd>estimates the total length of the several mode segments in order to guess the minimum version</dd>
  167. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  168. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getMinimumVersion">getMinimumVersion()</a>
  169. <span>
  170. &nbsp;: int </span>
  171. </dt>
  172. <dd>returns the minimum version number for the given string</dd>
  173. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  174. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeBitBuffer">writeBitBuffer()</a>
  175. <span>
  176. &nbsp;: void </span>
  177. </dt>
  178. <dd>creates a BitBuffer and writes the string data to it</dd>
  179. </dl>
  180. <section class="phpdocumentor-properties">
  181. <h3 class="phpdocumentor-elements__header" id="properties">
  182. Properties
  183. <a href="classes/chillerlan-QRCode-Data-QRData.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  184. </h3>
  185. <article
  186. class="
  187. phpdocumentor-element
  188. -property
  189. -private
  190. "
  191. >
  192. <h4 class="phpdocumentor-element__name" id="property_bitBuffer">
  193. $bitBuffer
  194. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_bitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  195. <span class="phpdocumentor-element__modifiers">
  196. </span>
  197. </h4>
  198. <aside class="phpdocumentor-element-found-in">
  199. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  200. :
  201. <span class="phpdocumentor-element-found-in__line">34</span>
  202. </aside>
  203. <p class="phpdocumentor-summary">a BitBuffer instance</p>
  204. <code class="phpdocumentor-code phpdocumentor-signature ">
  205. <span class="phpdocumentor-signature__visibility">private</span>
  206. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  207. <span class="phpdocumentor-signature__name">$bitBuffer</span>
  208. </code>
  209. <section class="phpdocumentor-description"></section>
  210. </article>
  211. <article
  212. class="
  213. phpdocumentor-element
  214. -property
  215. -private
  216. "
  217. >
  218. <h4 class="phpdocumentor-element__name" id="property_dataSegments">
  219. $dataSegments
  220. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_dataSegments" class="headerlink"><i class="fas fa-link"></i></a>
  221. <span class="phpdocumentor-element__modifiers">
  222. </span>
  223. </h4>
  224. <aside class="phpdocumentor-element-found-in">
  225. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRData.php"><a href="files/src-data-qrdata.html"><abbr title="src/Data/QRData.php">QRData.php</abbr></a></abbr>
  226. :
  227. <span class="phpdocumentor-element-found-in__line">49</span>
  228. </aside>
  229. <code class="phpdocumentor-code phpdocumentor-signature ">
  230. <span class="phpdocumentor-signature__visibility">private</span>
  231. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  232. <span class="phpdocumentor-signature__name">$dataSegments</span>
  233. = <span class="phpdocumentor-signature__default-value">[]</span></code>
  234. </article>
  235. <article
  236. class="
  237. phpdocumentor-element
  238. -property
  239. -private
  240. "
  241. >
  242. <h4 class="phpdocumentor-element__name" id="property_eccLevel">
  243. $eccLevel
  244. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_eccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  245. <span class="phpdocumentor-element__modifiers">
  246. </span>
  247. </h4>
  248. <aside class="phpdocumentor-element-found-in">
  249. <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>
  250. :
  251. <span class="phpdocumentor-element-found-in__line">39</span>
  252. </aside>
  253. <p class="phpdocumentor-summary">an EccLevel instance</p>
  254. <code class="phpdocumentor-code phpdocumentor-signature ">
  255. <span class="phpdocumentor-signature__visibility">private</span>
  256. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a></span>
  257. <span class="phpdocumentor-signature__name">$eccLevel</span>
  258. </code>
  259. <section class="phpdocumentor-description"></section>
  260. </article>
  261. <article
  262. class="
  263. phpdocumentor-element
  264. -property
  265. -private
  266. "
  267. >
  268. <h4 class="phpdocumentor-element__name" id="property_maxBitsForEcc">
  269. $maxBitsForEcc
  270. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_maxBitsForEcc" class="headerlink"><i class="fas fa-link"></i></a>
  271. <span class="phpdocumentor-element__modifiers">
  272. </span>
  273. </h4>
  274. <aside class="phpdocumentor-element-found-in">
  275. <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>
  276. :
  277. <span class="phpdocumentor-element-found-in__line">56</span>
  278. </aside>
  279. <p class="phpdocumentor-summary">Max bits for the current ECC mode</p>
  280. <code class="phpdocumentor-code phpdocumentor-signature ">
  281. <span class="phpdocumentor-signature__visibility">private</span>
  282. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  283. <span class="phpdocumentor-signature__name">$maxBitsForEcc</span>
  284. </code>
  285. </article>
  286. <article
  287. class="
  288. phpdocumentor-element
  289. -property
  290. -private
  291. "
  292. >
  293. <h4 class="phpdocumentor-element__name" id="property_options">
  294. $options
  295. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  296. <span class="phpdocumentor-element__modifiers">
  297. </span>
  298. </h4>
  299. <aside class="phpdocumentor-element-found-in">
  300. <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>
  301. :
  302. <span class="phpdocumentor-element-found-in__line">29</span>
  303. </aside>
  304. <p class="phpdocumentor-summary">the options instance</p>
  305. <code class="phpdocumentor-code phpdocumentor-signature ">
  306. <span class="phpdocumentor-signature__visibility">private</span>
  307. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  308. <span class="phpdocumentor-signature__name">$options</span>
  309. </code>
  310. </article>
  311. <article
  312. class="
  313. phpdocumentor-element
  314. -property
  315. -private
  316. "
  317. >
  318. <h4 class="phpdocumentor-element__name" id="property_version">
  319. $version
  320. <a href="classes/chillerlan-QRCode-Data-QRData.html#property_version" class="headerlink"><i class="fas fa-link"></i></a>
  321. <span class="phpdocumentor-element__modifiers">
  322. </span>
  323. </h4>
  324. <aside class="phpdocumentor-element-found-in">
  325. <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>
  326. :
  327. <span class="phpdocumentor-element-found-in__line">44</span>
  328. </aside>
  329. <p class="phpdocumentor-summary">current QR Code version</p>
  330. <code class="phpdocumentor-code phpdocumentor-signature ">
  331. <span class="phpdocumentor-signature__visibility">private</span>
  332. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  333. <span class="phpdocumentor-signature__name">$version</span>
  334. </code>
  335. <section class="phpdocumentor-description"></section>
  336. </article>
  337. </section>
  338. <section class="phpdocumentor-methods">
  339. <h3 class="phpdocumentor-elements__header" id="methods">
  340. Methods
  341. <a href="classes/chillerlan-QRCode-Data-QRData.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  342. </h3>
  343. <article
  344. class="phpdocumentor-element
  345. -method
  346. -public
  347. "
  348. >
  349. <h4 class="phpdocumentor-element__name" id="method___construct">
  350. __construct()
  351. <a href="classes/chillerlan-QRCode-Data-QRData.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  352. </h4>
  353. <aside class="phpdocumentor-element-found-in">
  354. <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>
  355. :
  356. <span class="phpdocumentor-element-found-in__line">64</span>
  357. </aside>
  358. <p class="phpdocumentor-summary">QRData constructor.</p>
  359. <code class="phpdocumentor-code phpdocumentor-signature ">
  360. <span class="phpdocumentor-signature__visibility">public</span>
  361. <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>
  362. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  363. <dl class="phpdocumentor-argument-list">
  364. <dt class="phpdocumentor-argument-list__entry">
  365. <span class="phpdocumentor-signature__argument__name">$options</span>
  366. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  367. </dt>
  368. <dd class="phpdocumentor-argument-list__definition">
  369. </dd>
  370. <dt class="phpdocumentor-argument-list__entry">
  371. <span class="phpdocumentor-signature__argument__name">$dataSegments</span>
  372. : <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>
  373. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  374. <dd class="phpdocumentor-argument-list__definition">
  375. </dd>
  376. </dl>
  377. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  378. <span class="phpdocumentor-signature__response_type">mixed</span>
  379. &mdash;
  380. </article>
  381. <article
  382. class="phpdocumentor-element
  383. -method
  384. -public
  385. "
  386. >
  387. <h4 class="phpdocumentor-element__name" id="method_setData">
  388. setData()
  389. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_setData" class="headerlink"><i class="fas fa-link"></i></a>
  390. </h4>
  391. <aside class="phpdocumentor-element-found-in">
  392. <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>
  393. :
  394. <span class="phpdocumentor-element-found-in__line">79</span>
  395. </aside>
  396. <p class="phpdocumentor-summary">Sets the data string (internally called by the constructor)</p>
  397. <code class="phpdocumentor-code phpdocumentor-signature ">
  398. <span class="phpdocumentor-signature__visibility">public</span>
  399. <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>
  400. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  401. <dl class="phpdocumentor-argument-list">
  402. <dt class="phpdocumentor-argument-list__entry">
  403. <span class="phpdocumentor-signature__argument__name">$dataSegments</span>
  404. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  405. </dt>
  406. <dd class="phpdocumentor-argument-list__definition">
  407. <section class="phpdocumentor-description"></section>
  408. </dd>
  409. </dl>
  410. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  411. <span class="phpdocumentor-signature__response_type">self</span>
  412. &mdash;
  413. </article>
  414. <article
  415. class="phpdocumentor-element
  416. -method
  417. -public
  418. "
  419. >
  420. <h4 class="phpdocumentor-element__name" id="method_writeMatrix">
  421. writeMatrix()
  422. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  423. </h4>
  424. <aside class="phpdocumentor-element-found-in">
  425. <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>
  426. :
  427. <span class="phpdocumentor-element-found-in__line">96</span>
  428. </aside>
  429. <p class="phpdocumentor-summary">returns a fresh matrix object with the data written for the given $maskPattern</p>
  430. <code class="phpdocumentor-code phpdocumentor-signature ">
  431. <span class="phpdocumentor-signature__visibility">public</span>
  432. <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 class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$test</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"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span></code>
  433. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  434. <dl class="phpdocumentor-argument-list">
  435. <dt class="phpdocumentor-argument-list__entry">
  436. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  437. : <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>
  438. </dt>
  439. <dd class="phpdocumentor-argument-list__definition">
  440. <section class="phpdocumentor-description"></section>
  441. </dd>
  442. <dt class="phpdocumentor-argument-list__entry">
  443. <span class="phpdocumentor-signature__argument__name">$test</span>
  444. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  445. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  446. <dd class="phpdocumentor-argument-list__definition">
  447. <section class="phpdocumentor-description"></section>
  448. </dd>
  449. </dl>
  450. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  451. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  452. &mdash;
  453. </article>
  454. <article
  455. class="phpdocumentor-element
  456. -method
  457. -private
  458. "
  459. >
  460. <h4 class="phpdocumentor-element__name" id="method_estimateTotalBitLength">
  461. estimateTotalBitLength()
  462. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_estimateTotalBitLength" class="headerlink"><i class="fas fa-link"></i></a>
  463. </h4>
  464. <aside class="phpdocumentor-element-found-in">
  465. <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>
  466. :
  467. <span class="phpdocumentor-element-found-in__line">111</span>
  468. </aside>
  469. <p class="phpdocumentor-summary">estimates the total length of the several mode segments in order to guess the minimum version</p>
  470. <code class="phpdocumentor-code phpdocumentor-signature ">
  471. <span class="phpdocumentor-signature__visibility">private</span>
  472. <span class="phpdocumentor-signature__name">estimateTotalBitLength</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  473. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  474. Tags
  475. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  476. </h5>
  477. <dl class="phpdocumentor-tag-list">
  478. <dt class="phpdocumentor-tag-list__entry">
  479. <span class="phpdocumentor-tag__name">throws</span>
  480. </dt>
  481. <dd class="phpdocumentor-tag-list__definition">
  482. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  483. </dd>
  484. </dl>
  485. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  486. <span class="phpdocumentor-signature__response_type">int</span>
  487. &mdash;
  488. </article>
  489. <article
  490. class="phpdocumentor-element
  491. -method
  492. -private
  493. "
  494. >
  495. <h4 class="phpdocumentor-element__name" id="method_getMinimumVersion">
  496. getMinimumVersion()
  497. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_getMinimumVersion" class="headerlink"><i class="fas fa-link"></i></a>
  498. </h4>
  499. <aside class="phpdocumentor-element-found-in">
  500. <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>
  501. :
  502. <span class="phpdocumentor-element-found-in__line">145</span>
  503. </aside>
  504. <p class="phpdocumentor-summary">returns the minimum version number for the given string</p>
  505. <code class="phpdocumentor-code phpdocumentor-signature ">
  506. <span class="phpdocumentor-signature__visibility">private</span>
  507. <span class="phpdocumentor-signature__name">getMinimumVersion</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  508. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  509. Tags
  510. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  511. </h5>
  512. <dl class="phpdocumentor-tag-list">
  513. <dt class="phpdocumentor-tag-list__entry">
  514. <span class="phpdocumentor-tag__name">throws</span>
  515. </dt>
  516. <dd class="phpdocumentor-tag-list__definition">
  517. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  518. </dd>
  519. </dl>
  520. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  521. <span class="phpdocumentor-signature__response_type">int</span>
  522. &mdash;
  523. </article>
  524. <article
  525. class="phpdocumentor-element
  526. -method
  527. -private
  528. "
  529. >
  530. <h4 class="phpdocumentor-element__name" id="method_writeBitBuffer">
  531. writeBitBuffer()
  532. <a href="classes/chillerlan-QRCode-Data-QRData.html#method_writeBitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  533. </h4>
  534. <aside class="phpdocumentor-element-found-in">
  535. <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>
  536. :
  537. <span class="phpdocumentor-element-found-in__line">165</span>
  538. </aside>
  539. <p class="phpdocumentor-summary">creates a BitBuffer and writes the string data to it</p>
  540. <code class="phpdocumentor-code phpdocumentor-signature ">
  541. <span class="phpdocumentor-signature__visibility">private</span>
  542. <span class="phpdocumentor-signature__name">writeBitBuffer</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  543. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  544. Tags
  545. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  546. </h5>
  547. <dl class="phpdocumentor-tag-list">
  548. <dt class="phpdocumentor-tag-list__entry">
  549. <span class="phpdocumentor-tag__name">throws</span>
  550. </dt>
  551. <dd class="phpdocumentor-tag-list__definition">
  552. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  553. <section class="phpdocumentor-description"><p>on data overflow</p>
  554. </section>
  555. </dd>
  556. </dl>
  557. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  558. <span class="phpdocumentor-signature__response_type">void</span>
  559. &mdash;
  560. </article>
  561. </section>
  562. <script type="text/javascript">
  563. function loadExternalCodeSnippets(line) {
  564. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  565. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  566. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  567. var language = 'php';
  568. var code = document.createElement('code');
  569. code.className = 'language-' + language;
  570. pre.textContent = '';
  571. pre.setAttribute('data-line', line)
  572. code.textContent = 'Loading…';
  573. pre.appendChild(code);
  574. var xhr = new XMLHttpRequest();
  575. xhr.open('GET', src, true);
  576. xhr.onreadystatechange = function () {
  577. if (xhr.readyState == 4) {
  578. if (xhr.status < 400 && xhr.responseText) {
  579. code.textContent = xhr.responseText;
  580. Prism.highlightElement(code);
  581. }
  582. else if (xhr.status >= 400) {
  583. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  584. }
  585. else {
  586. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  587. }
  588. }
  589. };
  590. xhr.send(null);
  591. });
  592. }
  593. var modals = document.querySelectorAll("[data-modal]");
  594. modals.forEach(function (trigger) {
  595. trigger.addEventListener("click", function (event) {
  596. //event.preventDefault();
  597. const modal = document.getElementById(trigger.dataset.modal);
  598. modal.classList.add("phpdocumentor-modal__open");
  599. loadExternalCodeSnippets(trigger.dataset.line)
  600. const exits = modal.querySelectorAll("[data-exit-button]");
  601. exits.forEach(function (exit) {
  602. exit.addEventListener("click", function (event) {
  603. event.preventDefault();
  604. modal.classList.remove("phpdocumentor-modal__open");
  605. });
  606. });
  607. });
  608. });
  609. </script>
  610. </article>
  611. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  612. <section class="phpdocumentor-search-results__dialog">
  613. <header class="phpdocumentor-search-results__header">
  614. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  615. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  616. </header>
  617. <section class="phpdocumentor-search-results__body">
  618. <ul class="phpdocumentor-search-results__entries"></ul>
  619. </section>
  620. </section>
  621. </section>
  622. </div>
  623. </div>
  624. <a href="classes/chillerlan-QRCode-Data-QRData.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  625. </main>
  626. <script>
  627. cssVars({});
  628. </script>
  629. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  630. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  631. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  632. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  633. </body>
  634. </html>