chillerlan-QRCode-Data-QRData.html 44 KB

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