chillerlan-QRCode-Output-QROutputAbstract.html 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  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-output.html">Output</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. QROutputAbstract
  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. <span class="phpdocumentor-element__implements">
  100. implements
  101. <a href="classes/chillerlan-QRCode-Output-QROutputInterface.html"><abbr title="\chillerlan\QRCode\Output\QROutputInterface">QROutputInterface</abbr></a> </span>
  102. </h2>
  103. <aside class="phpdocumentor-element-found-in">
  104. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  105. :
  106. <span class="phpdocumentor-element-found-in__line">21</span>
  107. </aside>
  108. <p class="phpdocumentor-summary">common output abstract</p>
  109. <h3 id="interfaces_class_traits">
  110. Interfaces, Classes, Traits and Enums
  111. <a href="#interfaces_class_traits" class="headerlink"><i class="fas fa-link"></i></a>
  112. </h3>
  113. <dl class="phpdocumentor-table-of-contents">
  114. <dt class="phpdocumentor-table-of-contents__entry -interface"><a href="classes/chillerlan-QRCode-Output-QROutputInterface.html"><abbr title="\chillerlan\QRCode\Output\QROutputInterface">QROutputInterface</abbr></a></dt>
  115. <dd>Converts the data matrix into readable output</dd>
  116. </dl>
  117. <h3 id="toc">
  118. Table of Contents
  119. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  120. </h3>
  121. <dl class="phpdocumentor-table-of-contents">
  122. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  123. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length</a>
  124. <span>
  125. &nbsp;: int </span>
  126. </dt>
  127. <dd>the side length of the QR image (modules * scale)</dd>
  128. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  129. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix</a>
  130. <span>
  131. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  132. </dt>
  133. <dd>the (filled) data matrix object</dd>
  134. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  135. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount</a>
  136. <span>
  137. &nbsp;: int </span>
  138. </dt>
  139. <dd>the current size of the QR matrix</dd>
  140. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  141. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues</a>
  142. <span>
  143. &nbsp;: array&lt;string|int, mixed&gt; </span>
  144. </dt>
  145. <dd>an (optional) array of color values for the several QR matrix parts</dd>
  146. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  147. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options</a>
  148. <span>
  149. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  150. </dt>
  151. <dd></dd>
  152. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  153. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale</a>
  154. <span>
  155. &nbsp;: int </span>
  156. </dt>
  157. <dd>the current scaling for a QR pixel</dd>
  158. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  159. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a>
  160. <span>
  161. &nbsp;: mixed </span>
  162. </dt>
  163. <dd>QROutputAbstract constructor.</dd>
  164. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  165. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a>
  166. <span>
  167. &nbsp;: array&lt;string|int, mixed&gt; </span>
  168. </dt>
  169. <dd>collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  170. returns an array with the transformed modules</dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  172. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a>
  173. <span>
  174. &nbsp;: mixed </span>
  175. </dt>
  176. <dd>Returns a default value for either dark or light modules (return value depends on the output module)</dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  178. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a>
  179. <span>
  180. &nbsp;: mixed </span>
  181. </dt>
  182. <dd>Returns the final value for the given input (return value depends on the output module)</dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  184. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  185. <span>
  186. &nbsp;: void </span>
  187. </dt>
  188. <dd>Saves the qr $data to a $file. If $file is null, nothing happens.</dd>
  189. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  190. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a>
  191. <span>
  192. &nbsp;: void </span>
  193. </dt>
  194. <dd>Sets/updates the matrix dimensions</dd>
  195. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  196. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  197. <span>
  198. &nbsp;: void </span>
  199. </dt>
  200. <dd>Sets the initial module values</dd>
  201. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  202. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a>
  203. <span>
  204. &nbsp;: string </span>
  205. </dt>
  206. <dd>Returns a base64 data URI for the given string and mime type</dd>
  207. </dl>
  208. <section class="phpdocumentor-properties">
  209. <h3 class="phpdocumentor-elements__header" id="properties">
  210. Properties
  211. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  212. </h3>
  213. <article
  214. class="
  215. phpdocumentor-element
  216. -property
  217. -protected
  218. "
  219. >
  220. <h4 class="phpdocumentor-element__name" id="property_length">
  221. $length
  222. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  223. <span class="phpdocumentor-element__modifiers">
  224. </span>
  225. </h4>
  226. <aside class="phpdocumentor-element-found-in">
  227. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  228. :
  229. <span class="phpdocumentor-element-found-in__line">40</span>
  230. </aside>
  231. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  232. <code class="phpdocumentor-code phpdocumentor-signature ">
  233. <span class="phpdocumentor-signature__visibility">protected</span>
  234. <span class="phpdocumentor-signature__type">int</span>
  235. <span class="phpdocumentor-signature__name">$length</span>
  236. </code>
  237. <section class="phpdocumentor-description"></section>
  238. </article>
  239. <article
  240. class="
  241. phpdocumentor-element
  242. -property
  243. -protected
  244. "
  245. >
  246. <h4 class="phpdocumentor-element__name" id="property_matrix">
  247. $matrix
  248. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  249. <span class="phpdocumentor-element__modifiers">
  250. </span>
  251. </h4>
  252. <aside class="phpdocumentor-element-found-in">
  253. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  254. :
  255. <span class="phpdocumentor-element-found-in__line">50</span>
  256. </aside>
  257. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  258. <code class="phpdocumentor-code phpdocumentor-signature ">
  259. <span class="phpdocumentor-signature__visibility">protected</span>
  260. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  261. <span class="phpdocumentor-signature__name">$matrix</span>
  262. </code>
  263. <section class="phpdocumentor-description"></section>
  264. </article>
  265. <article
  266. class="
  267. phpdocumentor-element
  268. -property
  269. -protected
  270. "
  271. >
  272. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  273. $moduleCount
  274. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" 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/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  280. :
  281. <span class="phpdocumentor-element-found-in__line">28</span>
  282. </aside>
  283. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  284. <code class="phpdocumentor-code phpdocumentor-signature ">
  285. <span class="phpdocumentor-signature__visibility">protected</span>
  286. <span class="phpdocumentor-signature__type">int</span>
  287. <span class="phpdocumentor-signature__name">$moduleCount</span>
  288. </code>
  289. <section class="phpdocumentor-description"></section>
  290. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  291. Tags
  292. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  293. </h5>
  294. <dl class="phpdocumentor-tag-list">
  295. <dt class="phpdocumentor-tag-list__entry">
  296. <span class="phpdocumentor-tag__name">see</span>
  297. </dt>
  298. <dd class="phpdocumentor-tag-list__definition">
  299. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html#method_size"><abbr title="\chillerlan\QRCode\Data\QRMatrix::size()">QRMatrix::size()</abbr></a></span>
  300. </dd>
  301. </dl>
  302. </article>
  303. <article
  304. class="
  305. phpdocumentor-element
  306. -property
  307. -protected
  308. "
  309. >
  310. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  311. $moduleValues
  312. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  313. <span class="phpdocumentor-element__modifiers">
  314. </span>
  315. </h4>
  316. <aside class="phpdocumentor-element-found-in">
  317. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  318. :
  319. <span class="phpdocumentor-element-found-in__line">45</span>
  320. </aside>
  321. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  322. <code class="phpdocumentor-code phpdocumentor-signature ">
  323. <span class="phpdocumentor-signature__visibility">protected</span>
  324. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  325. <span class="phpdocumentor-signature__name">$moduleValues</span>
  326. </code>
  327. <section class="phpdocumentor-description"></section>
  328. </article>
  329. <article
  330. class="
  331. phpdocumentor-element
  332. -property
  333. -protected
  334. "
  335. >
  336. <h4 class="phpdocumentor-element__name" id="property_options">
  337. $options
  338. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  339. <span class="phpdocumentor-element__modifiers">
  340. </span>
  341. </h4>
  342. <aside class="phpdocumentor-element-found-in">
  343. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  344. :
  345. <span class="phpdocumentor-element-found-in__line">55</span>
  346. </aside>
  347. <code class="phpdocumentor-code phpdocumentor-signature ">
  348. <span class="phpdocumentor-signature__visibility">protected</span>
  349. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  350. <span class="phpdocumentor-signature__name">$options</span>
  351. </code>
  352. </article>
  353. <article
  354. class="
  355. phpdocumentor-element
  356. -property
  357. -protected
  358. "
  359. >
  360. <h4 class="phpdocumentor-element__name" id="property_scale">
  361. $scale
  362. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  363. <span class="phpdocumentor-element__modifiers">
  364. </span>
  365. </h4>
  366. <aside class="phpdocumentor-element-found-in">
  367. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  368. :
  369. <span class="phpdocumentor-element-found-in__line">35</span>
  370. </aside>
  371. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  372. <code class="phpdocumentor-code phpdocumentor-signature ">
  373. <span class="phpdocumentor-signature__visibility">protected</span>
  374. <span class="phpdocumentor-signature__type">int</span>
  375. <span class="phpdocumentor-signature__name">$scale</span>
  376. </code>
  377. <section class="phpdocumentor-description"></section>
  378. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  379. Tags
  380. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  381. </h5>
  382. <dl class="phpdocumentor-tag-list">
  383. <dt class="phpdocumentor-tag-list__entry">
  384. <span class="phpdocumentor-tag__name">see</span>
  385. </dt>
  386. <dd class="phpdocumentor-tag-list__definition">
  387. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  388. </dd>
  389. </dl>
  390. </article>
  391. </section>
  392. <section class="phpdocumentor-methods">
  393. <h3 class="phpdocumentor-elements__header" id="methods">
  394. Methods
  395. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  396. </h3>
  397. <article
  398. class="phpdocumentor-element
  399. -method
  400. -public
  401. "
  402. >
  403. <h4 class="phpdocumentor-element__name" id="method___construct">
  404. __construct()
  405. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  406. </h4>
  407. <aside class="phpdocumentor-element-found-in">
  408. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  409. :
  410. <span class="phpdocumentor-element-found-in__line">60</span>
  411. </aside>
  412. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  413. <code class="phpdocumentor-code phpdocumentor-signature ">
  414. <span class="phpdocumentor-signature__visibility">public</span>
  415. <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 class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  416. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  417. <dl class="phpdocumentor-argument-list">
  418. <dt class="phpdocumentor-argument-list__entry">
  419. <span class="phpdocumentor-signature__argument__name">$options</span>
  420. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  421. </dt>
  422. <dd class="phpdocumentor-argument-list__definition">
  423. <section class="phpdocumentor-description"></section>
  424. </dd>
  425. <dt class="phpdocumentor-argument-list__entry">
  426. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  427. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  428. </dt>
  429. <dd class="phpdocumentor-argument-list__definition">
  430. <section class="phpdocumentor-description"></section>
  431. </dd>
  432. </dl>
  433. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  434. <span class="phpdocumentor-signature__response_type">mixed</span>
  435. &mdash;
  436. </article>
  437. <article
  438. class="phpdocumentor-element
  439. -method
  440. -protected
  441. "
  442. >
  443. <h4 class="phpdocumentor-element__name" id="method_collectModules">
  444. collectModules()
  445. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules" class="headerlink"><i class="fas fa-link"></i></a>
  446. </h4>
  447. <aside class="phpdocumentor-element-found-in">
  448. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  449. :
  450. <span class="phpdocumentor-element-found-in__line">151</span>
  451. </aside>
  452. <p class="phpdocumentor-summary">collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  453. returns an array with the transformed modules</p>
  454. <code class="phpdocumentor-code phpdocumentor-signature ">
  455. <span class="phpdocumentor-signature__visibility">protected</span>
  456. <span class="phpdocumentor-signature__name">collectModules</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$transform</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  457. <section class="phpdocumentor-description"><p>The transform callback is called with the following parameters:</p>
  458. <p>$x - current column
  459. $y - current row
  460. $M_TYPE - field value
  461. $M_TYPE_LAYER - (possibly modified) field value that acts as layer id</p>
  462. </section>
  463. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  464. <dl class="phpdocumentor-argument-list">
  465. <dt class="phpdocumentor-argument-list__entry">
  466. <span class="phpdocumentor-signature__argument__name">$transform</span>
  467. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  468. </dt>
  469. <dd class="phpdocumentor-argument-list__definition">
  470. <section class="phpdocumentor-description"></section>
  471. </dd>
  472. </dl>
  473. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  474. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  475. &mdash;
  476. </article>
  477. <article
  478. class="phpdocumentor-element
  479. -method
  480. -protected
  481. -abstract "
  482. >
  483. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  484. getDefaultModuleValue()
  485. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  486. </h4>
  487. <aside class="phpdocumentor-element-found-in">
  488. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  489. :
  490. <span class="phpdocumentor-element-found-in__line">108</span>
  491. </aside>
  492. <p class="phpdocumentor-summary">Returns a default value for either dark or light modules (return value depends on the output module)</p>
  493. <code class="phpdocumentor-code phpdocumentor-signature ">
  494. <span class="phpdocumentor-signature__visibility">protected</span>
  495. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">getDefaultModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$isDark</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  496. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  497. <dl class="phpdocumentor-argument-list">
  498. <dt class="phpdocumentor-argument-list__entry">
  499. <span class="phpdocumentor-signature__argument__name">$isDark</span>
  500. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  501. </dt>
  502. <dd class="phpdocumentor-argument-list__definition">
  503. <section class="phpdocumentor-description"></section>
  504. </dd>
  505. </dl>
  506. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  507. <span class="phpdocumentor-signature__response_type">mixed</span>
  508. &mdash;
  509. </article>
  510. <article
  511. class="phpdocumentor-element
  512. -method
  513. -protected
  514. -abstract "
  515. >
  516. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  517. getModuleValue()
  518. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  519. </h4>
  520. <aside class="phpdocumentor-element-found-in">
  521. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  522. :
  523. <span class="phpdocumentor-element-found-in__line">101</span>
  524. </aside>
  525. <p class="phpdocumentor-summary">Returns the final value for the given input (return value depends on the output module)</p>
  526. <code class="phpdocumentor-code phpdocumentor-signature ">
  527. <span class="phpdocumentor-signature__visibility">protected</span>
  528. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">getModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  529. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  530. <dl class="phpdocumentor-argument-list">
  531. <dt class="phpdocumentor-argument-list__entry">
  532. <span class="phpdocumentor-signature__argument__name">$value</span>
  533. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  534. </dt>
  535. <dd class="phpdocumentor-argument-list__definition">
  536. </dd>
  537. </dl>
  538. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  539. <span class="phpdocumentor-signature__response_type">mixed</span>
  540. &mdash;
  541. </article>
  542. <article
  543. class="phpdocumentor-element
  544. -method
  545. -protected
  546. "
  547. >
  548. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  549. saveToFile()
  550. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" class="headerlink"><i class="fas fa-link"></i></a>
  551. </h4>
  552. <aside class="phpdocumentor-element-found-in">
  553. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  554. :
  555. <span class="phpdocumentor-element-found-in__line">125</span>
  556. </aside>
  557. <p class="phpdocumentor-summary">Saves the qr $data to a $file. If $file is null, nothing happens.</p>
  558. <code class="phpdocumentor-code phpdocumentor-signature ">
  559. <span class="phpdocumentor-signature__visibility">protected</span>
  560. <span class="phpdocumentor-signature__name">saveToFile</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$file</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">void</span></code>
  561. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  562. <dl class="phpdocumentor-argument-list">
  563. <dt class="phpdocumentor-argument-list__entry">
  564. <span class="phpdocumentor-signature__argument__name">$data</span>
  565. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  566. </dt>
  567. <dd class="phpdocumentor-argument-list__definition">
  568. <section class="phpdocumentor-description"></section>
  569. </dd>
  570. <dt class="phpdocumentor-argument-list__entry">
  571. <span class="phpdocumentor-signature__argument__name">$file</span>
  572. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  573. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  574. <dd class="phpdocumentor-argument-list__definition">
  575. <section class="phpdocumentor-description"></section>
  576. </dd>
  577. </dl>
  578. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  579. Tags
  580. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  581. </h5>
  582. <dl class="phpdocumentor-tag-list">
  583. <dt class="phpdocumentor-tag-list__entry">
  584. <span class="phpdocumentor-tag__name">see</span>
  585. </dt>
  586. <dd class="phpdocumentor-tag-list__definition">
  587. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  588. </dd>
  589. <dt class="phpdocumentor-tag-list__entry">
  590. <span class="phpdocumentor-tag__name">see</span>
  591. </dt>
  592. <dd class="phpdocumentor-tag-list__definition">
  593. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$cachefile">QROptions::$cachefile</abbr></span>
  594. </dd>
  595. <dt class="phpdocumentor-tag-list__entry">
  596. <span class="phpdocumentor-tag__name">throws</span>
  597. </dt>
  598. <dd class="phpdocumentor-tag-list__definition">
  599. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  600. </dd>
  601. </dl>
  602. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  603. <span class="phpdocumentor-signature__response_type">void</span>
  604. &mdash;
  605. </article>
  606. <article
  607. class="phpdocumentor-element
  608. -method
  609. -protected
  610. "
  611. >
  612. <h4 class="phpdocumentor-element__name" id="method_setMatrixDimensions">
  613. setMatrixDimensions()
  614. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  615. </h4>
  616. <aside class="phpdocumentor-element-found-in">
  617. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  618. :
  619. <span class="phpdocumentor-element-found-in__line">73</span>
  620. </aside>
  621. <p class="phpdocumentor-summary">Sets/updates the matrix dimensions</p>
  622. <code class="phpdocumentor-code phpdocumentor-signature ">
  623. <span class="phpdocumentor-signature__visibility">protected</span>
  624. <span class="phpdocumentor-signature__name">setMatrixDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  625. <section class="phpdocumentor-description"><p>Call this method if you modify the matrix from within your custom module in case the dimensions have been changed</p>
  626. </section>
  627. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  628. <span class="phpdocumentor-signature__response_type">void</span>
  629. &mdash;
  630. </article>
  631. <article
  632. class="phpdocumentor-element
  633. -method
  634. -protected
  635. "
  636. >
  637. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  638. setModuleValues()
  639. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  640. </h4>
  641. <aside class="phpdocumentor-element-found-in">
  642. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  643. :
  644. <span class="phpdocumentor-element-found-in__line">82</span>
  645. </aside>
  646. <p class="phpdocumentor-summary">Sets the initial module values</p>
  647. <code class="phpdocumentor-code phpdocumentor-signature ">
  648. <span class="phpdocumentor-signature__visibility">protected</span>
  649. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  650. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  651. <span class="phpdocumentor-signature__response_type">void</span>
  652. &mdash;
  653. </article>
  654. <article
  655. class="phpdocumentor-element
  656. -method
  657. -protected
  658. "
  659. >
  660. <h4 class="phpdocumentor-element__name" id="method_toBase64DataURI">
  661. toBase64DataURI()
  662. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI" class="headerlink"><i class="fas fa-link"></i></a>
  663. </h4>
  664. <aside class="phpdocumentor-element-found-in">
  665. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  666. :
  667. <span class="phpdocumentor-element-found-in__line">113</span>
  668. </aside>
  669. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  670. <code class="phpdocumentor-code phpdocumentor-signature ">
  671. <span class="phpdocumentor-signature__visibility">protected</span>
  672. <span class="phpdocumentor-signature__name">toBase64DataURI</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$mime</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  673. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  674. <dl class="phpdocumentor-argument-list">
  675. <dt class="phpdocumentor-argument-list__entry">
  676. <span class="phpdocumentor-signature__argument__name">$data</span>
  677. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  678. </dt>
  679. <dd class="phpdocumentor-argument-list__definition">
  680. <section class="phpdocumentor-description"></section>
  681. </dd>
  682. <dt class="phpdocumentor-argument-list__entry">
  683. <span class="phpdocumentor-signature__argument__name">$mime</span>
  684. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  685. </dt>
  686. <dd class="phpdocumentor-argument-list__definition">
  687. <section class="phpdocumentor-description"></section>
  688. </dd>
  689. </dl>
  690. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  691. <span class="phpdocumentor-signature__response_type">string</span>
  692. &mdash;
  693. </article>
  694. </section>
  695. <script type="text/javascript">
  696. function loadExternalCodeSnippets(line) {
  697. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  698. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  699. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  700. var language = 'php';
  701. var code = document.createElement('code');
  702. code.className = 'language-' + language;
  703. pre.textContent = '';
  704. pre.setAttribute('data-line', line)
  705. code.textContent = 'Loading…';
  706. pre.appendChild(code);
  707. var xhr = new XMLHttpRequest();
  708. xhr.open('GET', src, true);
  709. xhr.onreadystatechange = function () {
  710. if (xhr.readyState == 4) {
  711. if (xhr.status < 400 && xhr.responseText) {
  712. code.textContent = xhr.responseText;
  713. Prism.highlightElement(code);
  714. }
  715. else if (xhr.status >= 400) {
  716. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  717. }
  718. else {
  719. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  720. }
  721. }
  722. };
  723. xhr.send(null);
  724. });
  725. }
  726. var modals = document.querySelectorAll("[data-modal]");
  727. modals.forEach(function (trigger) {
  728. trigger.addEventListener("click", function (event) {
  729. //event.preventDefault();
  730. const modal = document.getElementById(trigger.dataset.modal);
  731. modal.classList.add("phpdocumentor-modal__open");
  732. loadExternalCodeSnippets(trigger.dataset.line)
  733. const exits = modal.querySelectorAll("[data-exit-button]");
  734. exits.forEach(function (exit) {
  735. exit.addEventListener("click", function (event) {
  736. event.preventDefault();
  737. modal.classList.remove("phpdocumentor-modal__open");
  738. });
  739. });
  740. });
  741. });
  742. </script>
  743. </article>
  744. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  745. <section class="phpdocumentor-search-results__dialog">
  746. <header class="phpdocumentor-search-results__header">
  747. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  748. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  749. </header>
  750. <section class="phpdocumentor-search-results__body">
  751. <ul class="phpdocumentor-search-results__entries"></ul>
  752. </section>
  753. </section>
  754. </section>
  755. </div>
  756. </div>
  757. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  758. </main>
  759. <script>
  760. cssVars({});
  761. </script>
  762. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  763. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  764. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  765. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  766. </body>
  767. </html>