chillerlan-QRCode-Data-QRData.html 44 KB

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