chillerlan-QRCode-Output-QROutputAbstract.html 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114
  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|null </span>
  175. </dt>
  176. <dd>Returns a default value for either dark or light modules</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|null </span>
  181. </dt>
  182. <dd>Returns the prepared value for the given $M_TYPE</dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  184. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a>
  185. <span>
  186. &nbsp;: mixed|null </span>
  187. </dt>
  188. <dd>Returns the prepared module value at the given coordinate [$x, $y] (convenience)</dd>
  189. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  190. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a>
  191. <span>
  192. &nbsp;: mixed|null </span>
  193. </dt>
  194. <dd>Prepares the value for the given input ()</dd>
  195. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  196. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  197. <span>
  198. &nbsp;: void </span>
  199. </dt>
  200. <dd>Saves the qr $data to a $file. If $file is null, nothing happens.</dd>
  201. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  202. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a>
  203. <span>
  204. &nbsp;: void </span>
  205. </dt>
  206. <dd>Sets/updates the matrix dimensions</dd>
  207. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  208. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  209. <span>
  210. &nbsp;: void </span>
  211. </dt>
  212. <dd>Sets the initial module values</dd>
  213. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  214. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a>
  215. <span>
  216. &nbsp;: string </span>
  217. </dt>
  218. <dd>Returns a base64 data URI for the given string and mime type</dd>
  219. </dl>
  220. <section class="phpdocumentor-properties">
  221. <h3 class="phpdocumentor-elements__header" id="properties">
  222. Properties
  223. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  224. </h3>
  225. <article
  226. class="
  227. phpdocumentor-element
  228. -property
  229. -protected
  230. "
  231. >
  232. <h4 class="phpdocumentor-element__name" id="property_length">
  233. $length
  234. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  235. <span class="phpdocumentor-element__modifiers">
  236. </span>
  237. </h4>
  238. <aside class="phpdocumentor-element-found-in">
  239. <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>
  240. :
  241. <span class="phpdocumentor-element-found-in__line">40</span>
  242. </aside>
  243. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  244. <code class="phpdocumentor-code phpdocumentor-signature ">
  245. <span class="phpdocumentor-signature__visibility">protected</span>
  246. <span class="phpdocumentor-signature__type">int</span>
  247. <span class="phpdocumentor-signature__name">$length</span>
  248. </code>
  249. <section class="phpdocumentor-description"></section>
  250. </article>
  251. <article
  252. class="
  253. phpdocumentor-element
  254. -property
  255. -protected
  256. "
  257. >
  258. <h4 class="phpdocumentor-element__name" id="property_matrix">
  259. $matrix
  260. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" 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/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  266. :
  267. <span class="phpdocumentor-element-found-in__line">50</span>
  268. </aside>
  269. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  270. <code class="phpdocumentor-code phpdocumentor-signature ">
  271. <span class="phpdocumentor-signature__visibility">protected</span>
  272. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  273. <span class="phpdocumentor-signature__name">$matrix</span>
  274. </code>
  275. <section class="phpdocumentor-description"></section>
  276. </article>
  277. <article
  278. class="
  279. phpdocumentor-element
  280. -property
  281. -protected
  282. "
  283. >
  284. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  285. $moduleCount
  286. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" 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/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  292. :
  293. <span class="phpdocumentor-element-found-in__line">28</span>
  294. </aside>
  295. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  296. <code class="phpdocumentor-code phpdocumentor-signature ">
  297. <span class="phpdocumentor-signature__visibility">protected</span>
  298. <span class="phpdocumentor-signature__type">int</span>
  299. <span class="phpdocumentor-signature__name">$moduleCount</span>
  300. </code>
  301. <section class="phpdocumentor-description"></section>
  302. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  303. Tags
  304. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  305. </h5>
  306. <dl class="phpdocumentor-tag-list">
  307. <dt class="phpdocumentor-tag-list__entry">
  308. <span class="phpdocumentor-tag__name">see</span>
  309. </dt>
  310. <dd class="phpdocumentor-tag-list__definition">
  311. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html#method_getSize"><abbr title="\chillerlan\QRCode\Data\QRMatrix::getSize()">QRMatrix::getSize()</abbr></a></span>
  312. </dd>
  313. </dl>
  314. </article>
  315. <article
  316. class="
  317. phpdocumentor-element
  318. -property
  319. -protected
  320. "
  321. >
  322. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  323. $moduleValues
  324. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  325. <span class="phpdocumentor-element__modifiers">
  326. </span>
  327. </h4>
  328. <aside class="phpdocumentor-element-found-in">
  329. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  330. :
  331. <span class="phpdocumentor-element-found-in__line">45</span>
  332. </aside>
  333. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  334. <code class="phpdocumentor-code phpdocumentor-signature ">
  335. <span class="phpdocumentor-signature__visibility">protected</span>
  336. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  337. <span class="phpdocumentor-signature__name">$moduleValues</span>
  338. </code>
  339. <section class="phpdocumentor-description"></section>
  340. </article>
  341. <article
  342. class="
  343. phpdocumentor-element
  344. -property
  345. -protected
  346. "
  347. >
  348. <h4 class="phpdocumentor-element__name" id="property_options">
  349. $options
  350. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" 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/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  356. :
  357. <span class="phpdocumentor-element-found-in__line">55</span>
  358. </aside>
  359. <code class="phpdocumentor-code phpdocumentor-signature ">
  360. <span class="phpdocumentor-signature__visibility">protected</span>
  361. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  362. <span class="phpdocumentor-signature__name">$options</span>
  363. </code>
  364. </article>
  365. <article
  366. class="
  367. phpdocumentor-element
  368. -property
  369. -protected
  370. "
  371. >
  372. <h4 class="phpdocumentor-element__name" id="property_scale">
  373. $scale
  374. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  375. <span class="phpdocumentor-element__modifiers">
  376. </span>
  377. </h4>
  378. <aside class="phpdocumentor-element-found-in">
  379. <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>
  380. :
  381. <span class="phpdocumentor-element-found-in__line">35</span>
  382. </aside>
  383. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  384. <code class="phpdocumentor-code phpdocumentor-signature ">
  385. <span class="phpdocumentor-signature__visibility">protected</span>
  386. <span class="phpdocumentor-signature__type">int</span>
  387. <span class="phpdocumentor-signature__name">$scale</span>
  388. </code>
  389. <section class="phpdocumentor-description"></section>
  390. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  391. Tags
  392. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  393. </h5>
  394. <dl class="phpdocumentor-tag-list">
  395. <dt class="phpdocumentor-tag-list__entry">
  396. <span class="phpdocumentor-tag__name">see</span>
  397. </dt>
  398. <dd class="phpdocumentor-tag-list__definition">
  399. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  400. </dd>
  401. </dl>
  402. </article>
  403. </section>
  404. <section class="phpdocumentor-methods">
  405. <h3 class="phpdocumentor-elements__header" id="methods">
  406. Methods
  407. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  408. </h3>
  409. <article
  410. class="phpdocumentor-element
  411. -method
  412. -public
  413. "
  414. >
  415. <h4 class="phpdocumentor-element__name" id="method___construct">
  416. __construct()
  417. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  418. </h4>
  419. <aside class="phpdocumentor-element-found-in">
  420. <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>
  421. :
  422. <span class="phpdocumentor-element-found-in__line">60</span>
  423. </aside>
  424. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  425. <code class="phpdocumentor-code phpdocumentor-signature ">
  426. <span class="phpdocumentor-signature__visibility">public</span>
  427. <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>
  428. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  429. <dl class="phpdocumentor-argument-list">
  430. <dt class="phpdocumentor-argument-list__entry">
  431. <span class="phpdocumentor-signature__argument__name">$options</span>
  432. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  433. </dt>
  434. <dd class="phpdocumentor-argument-list__definition">
  435. <section class="phpdocumentor-description"></section>
  436. </dd>
  437. <dt class="phpdocumentor-argument-list__entry">
  438. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  439. : <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>
  440. </dt>
  441. <dd class="phpdocumentor-argument-list__definition">
  442. <section class="phpdocumentor-description"></section>
  443. </dd>
  444. </dl>
  445. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  446. <span class="phpdocumentor-signature__response_type">mixed</span>
  447. &mdash;
  448. </article>
  449. <article
  450. class="phpdocumentor-element
  451. -method
  452. -protected
  453. "
  454. >
  455. <h4 class="phpdocumentor-element__name" id="method_collectModules">
  456. collectModules()
  457. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules" class="headerlink"><i class="fas fa-link"></i></a>
  458. </h4>
  459. <aside class="phpdocumentor-element-found-in">
  460. <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>
  461. :
  462. <span class="phpdocumentor-element-found-in__line">176</span>
  463. </aside>
  464. <p class="phpdocumentor-summary">collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  465. returns an array with the transformed modules</p>
  466. <code class="phpdocumentor-code phpdocumentor-signature ">
  467. <span class="phpdocumentor-signature__visibility">protected</span>
  468. <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>
  469. <section class="phpdocumentor-description"><p>The transform callback is called with the following parameters:</p>
  470. <p>$x - current column
  471. $y - current row
  472. $M_TYPE - field value
  473. $M_TYPE_LAYER - (possibly modified) field value that acts as layer id</p>
  474. </section>
  475. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  476. <dl class="phpdocumentor-argument-list">
  477. <dt class="phpdocumentor-argument-list__entry">
  478. <span class="phpdocumentor-signature__argument__name">$transform</span>
  479. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  480. </dt>
  481. <dd class="phpdocumentor-argument-list__definition">
  482. <section class="phpdocumentor-description"></section>
  483. </dd>
  484. </dl>
  485. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  486. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  487. &mdash;
  488. </article>
  489. <article
  490. class="phpdocumentor-element
  491. -method
  492. -protected
  493. -abstract "
  494. >
  495. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  496. getDefaultModuleValue()
  497. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  498. </h4>
  499. <aside class="phpdocumentor-element-found-in">
  500. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  501. :
  502. <span class="phpdocumentor-element-found-in__line">133</span>
  503. </aside>
  504. <p class="phpdocumentor-summary">Returns a default value for either dark or light modules</p>
  505. <code class="phpdocumentor-code phpdocumentor-signature ">
  506. <span class="phpdocumentor-signature__visibility">protected</span>
  507. <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|null</span></code>
  508. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  509. <dl class="phpdocumentor-argument-list">
  510. <dt class="phpdocumentor-argument-list__entry">
  511. <span class="phpdocumentor-signature__argument__name">$isDark</span>
  512. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  513. </dt>
  514. <dd class="phpdocumentor-argument-list__definition">
  515. <section class="phpdocumentor-description"></section>
  516. </dd>
  517. </dl>
  518. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  519. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  520. &mdash;
  521. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  522. </section>
  523. </article>
  524. <article
  525. class="phpdocumentor-element
  526. -method
  527. -protected
  528. "
  529. >
  530. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  531. getModuleValue()
  532. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  533. </h4>
  534. <aside class="phpdocumentor-element-found-in">
  535. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  536. :
  537. <span class="phpdocumentor-element-found-in__line">100</span>
  538. </aside>
  539. <p class="phpdocumentor-summary">Returns the prepared value for the given $M_TYPE</p>
  540. <code class="phpdocumentor-code phpdocumentor-signature ">
  541. <span class="phpdocumentor-signature__visibility">protected</span>
  542. <span class="phpdocumentor-signature__name">getModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$M_TYPE</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  543. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  544. <dl class="phpdocumentor-argument-list">
  545. <dt class="phpdocumentor-argument-list__entry">
  546. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  547. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  548. </dt>
  549. <dd class="phpdocumentor-argument-list__definition">
  550. <section class="phpdocumentor-description"></section>
  551. </dd>
  552. </dl>
  553. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  554. Tags
  555. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  556. </h5>
  557. <dl class="phpdocumentor-tag-list">
  558. <dt class="phpdocumentor-tag-list__entry">
  559. <span class="phpdocumentor-tag__name">throws</span>
  560. </dt>
  561. <dd class="phpdocumentor-tag-list__definition">
  562. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  563. </dd>
  564. </dl>
  565. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  566. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  567. &mdash;
  568. <section class="phpdocumentor-description"><p>return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist</p>
  569. </section>
  570. </article>
  571. <article
  572. class="phpdocumentor-element
  573. -method
  574. -protected
  575. "
  576. >
  577. <h4 class="phpdocumentor-element__name" id="method_getModuleValueAt">
  578. getModuleValueAt()
  579. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt" class="headerlink"><i class="fas fa-link"></i></a>
  580. </h4>
  581. <aside class="phpdocumentor-element-found-in">
  582. <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>
  583. :
  584. <span class="phpdocumentor-element-found-in__line">115</span>
  585. </aside>
  586. <p class="phpdocumentor-summary">Returns the prepared module value at the given coordinate [$x, $y] (convenience)</p>
  587. <code class="phpdocumentor-code phpdocumentor-signature ">
  588. <span class="phpdocumentor-signature__visibility">protected</span>
  589. <span class="phpdocumentor-signature__name">getModuleValueAt</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$x</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  590. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  591. <dl class="phpdocumentor-argument-list">
  592. <dt class="phpdocumentor-argument-list__entry">
  593. <span class="phpdocumentor-signature__argument__name">$x</span>
  594. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  595. </dt>
  596. <dd class="phpdocumentor-argument-list__definition">
  597. <section class="phpdocumentor-description"></section>
  598. </dd>
  599. <dt class="phpdocumentor-argument-list__entry">
  600. <span class="phpdocumentor-signature__argument__name">$y</span>
  601. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  602. </dt>
  603. <dd class="phpdocumentor-argument-list__definition">
  604. <section class="phpdocumentor-description"></section>
  605. </dd>
  606. </dl>
  607. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  608. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  609. &mdash;
  610. </article>
  611. <article
  612. class="phpdocumentor-element
  613. -method
  614. -protected
  615. -abstract "
  616. >
  617. <h4 class="phpdocumentor-element__name" id="method_prepareModuleValue">
  618. prepareModuleValue()
  619. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  620. </h4>
  621. <aside class="phpdocumentor-element-found-in">
  622. <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>
  623. :
  624. <span class="phpdocumentor-element-found-in__line">126</span>
  625. </aside>
  626. <p class="phpdocumentor-summary">Prepares the value for the given input ()</p>
  627. <code class="phpdocumentor-code phpdocumentor-signature ">
  628. <span class="phpdocumentor-signature__visibility">protected</span>
  629. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">prepareModuleValue</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|null</span></code>
  630. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  631. <dl class="phpdocumentor-argument-list">
  632. <dt class="phpdocumentor-argument-list__entry">
  633. <span class="phpdocumentor-signature__argument__name">$value</span>
  634. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  635. </dt>
  636. <dd class="phpdocumentor-argument-list__definition">
  637. </dd>
  638. </dl>
  639. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  640. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  641. &mdash;
  642. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  643. </section>
  644. </article>
  645. <article
  646. class="phpdocumentor-element
  647. -method
  648. -protected
  649. "
  650. >
  651. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  652. saveToFile()
  653. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" class="headerlink"><i class="fas fa-link"></i></a>
  654. </h4>
  655. <aside class="phpdocumentor-element-found-in">
  656. <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>
  657. :
  658. <span class="phpdocumentor-element-found-in__line">150</span>
  659. </aside>
  660. <p class="phpdocumentor-summary">Saves the qr $data to a $file. If $file is null, nothing happens.</p>
  661. <code class="phpdocumentor-code phpdocumentor-signature ">
  662. <span class="phpdocumentor-signature__visibility">protected</span>
  663. <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>
  664. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  665. <dl class="phpdocumentor-argument-list">
  666. <dt class="phpdocumentor-argument-list__entry">
  667. <span class="phpdocumentor-signature__argument__name">$data</span>
  668. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  669. </dt>
  670. <dd class="phpdocumentor-argument-list__definition">
  671. <section class="phpdocumentor-description"></section>
  672. </dd>
  673. <dt class="phpdocumentor-argument-list__entry">
  674. <span class="phpdocumentor-signature__argument__name">$file</span>
  675. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  676. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  677. <dd class="phpdocumentor-argument-list__definition">
  678. <section class="phpdocumentor-description"></section>
  679. </dd>
  680. </dl>
  681. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  682. Tags
  683. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  684. </h5>
  685. <dl class="phpdocumentor-tag-list">
  686. <dt class="phpdocumentor-tag-list__entry">
  687. <span class="phpdocumentor-tag__name">see</span>
  688. </dt>
  689. <dd class="phpdocumentor-tag-list__definition">
  690. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  691. </dd>
  692. <dt class="phpdocumentor-tag-list__entry">
  693. <span class="phpdocumentor-tag__name">see</span>
  694. </dt>
  695. <dd class="phpdocumentor-tag-list__definition">
  696. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$cachefile">QROptions::$cachefile</abbr></span>
  697. </dd>
  698. <dt class="phpdocumentor-tag-list__entry">
  699. <span class="phpdocumentor-tag__name">throws</span>
  700. </dt>
  701. <dd class="phpdocumentor-tag-list__definition">
  702. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  703. </dd>
  704. </dl>
  705. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  706. <span class="phpdocumentor-signature__response_type">void</span>
  707. &mdash;
  708. </article>
  709. <article
  710. class="phpdocumentor-element
  711. -method
  712. -protected
  713. "
  714. >
  715. <h4 class="phpdocumentor-element__name" id="method_setMatrixDimensions">
  716. setMatrixDimensions()
  717. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  718. </h4>
  719. <aside class="phpdocumentor-element-found-in">
  720. <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>
  721. :
  722. <span class="phpdocumentor-element-found-in__line">73</span>
  723. </aside>
  724. <p class="phpdocumentor-summary">Sets/updates the matrix dimensions</p>
  725. <code class="phpdocumentor-code phpdocumentor-signature ">
  726. <span class="phpdocumentor-signature__visibility">protected</span>
  727. <span class="phpdocumentor-signature__name">setMatrixDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  728. <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>
  729. </section>
  730. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  731. <span class="phpdocumentor-signature__response_type">void</span>
  732. &mdash;
  733. </article>
  734. <article
  735. class="phpdocumentor-element
  736. -method
  737. -protected
  738. "
  739. >
  740. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  741. setModuleValues()
  742. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  743. </h4>
  744. <aside class="phpdocumentor-element-found-in">
  745. <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>
  746. :
  747. <span class="phpdocumentor-element-found-in__line">82</span>
  748. </aside>
  749. <p class="phpdocumentor-summary">Sets the initial module values</p>
  750. <code class="phpdocumentor-code phpdocumentor-signature ">
  751. <span class="phpdocumentor-signature__visibility">protected</span>
  752. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  753. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  754. <span class="phpdocumentor-signature__response_type">void</span>
  755. &mdash;
  756. </article>
  757. <article
  758. class="phpdocumentor-element
  759. -method
  760. -protected
  761. "
  762. >
  763. <h4 class="phpdocumentor-element__name" id="method_toBase64DataURI">
  764. toBase64DataURI()
  765. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI" class="headerlink"><i class="fas fa-link"></i></a>
  766. </h4>
  767. <aside class="phpdocumentor-element-found-in">
  768. <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>
  769. :
  770. <span class="phpdocumentor-element-found-in__line">138</span>
  771. </aside>
  772. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  773. <code class="phpdocumentor-code phpdocumentor-signature ">
  774. <span class="phpdocumentor-signature__visibility">protected</span>
  775. <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>
  776. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  777. <dl class="phpdocumentor-argument-list">
  778. <dt class="phpdocumentor-argument-list__entry">
  779. <span class="phpdocumentor-signature__argument__name">$data</span>
  780. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  781. </dt>
  782. <dd class="phpdocumentor-argument-list__definition">
  783. <section class="phpdocumentor-description"></section>
  784. </dd>
  785. <dt class="phpdocumentor-argument-list__entry">
  786. <span class="phpdocumentor-signature__argument__name">$mime</span>
  787. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  788. </dt>
  789. <dd class="phpdocumentor-argument-list__definition">
  790. <section class="phpdocumentor-description"></section>
  791. </dd>
  792. </dl>
  793. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  794. <span class="phpdocumentor-signature__response_type">string</span>
  795. &mdash;
  796. </article>
  797. </section>
  798. <script type="text/javascript">
  799. function loadExternalCodeSnippets(line) {
  800. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  801. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  802. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  803. var language = 'php';
  804. var code = document.createElement('code');
  805. code.className = 'language-' + language;
  806. pre.textContent = '';
  807. pre.setAttribute('data-line', line)
  808. code.textContent = 'Loading…';
  809. pre.appendChild(code);
  810. var xhr = new XMLHttpRequest();
  811. xhr.open('GET', src, true);
  812. xhr.onreadystatechange = function () {
  813. if (xhr.readyState == 4) {
  814. if (xhr.status < 400 && xhr.responseText) {
  815. code.textContent = xhr.responseText;
  816. Prism.highlightElement(code);
  817. }
  818. else if (xhr.status >= 400) {
  819. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  820. }
  821. else {
  822. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  823. }
  824. }
  825. };
  826. xhr.send(null);
  827. });
  828. }
  829. var modals = document.querySelectorAll("[data-modal]");
  830. modals.forEach(function (trigger) {
  831. trigger.addEventListener("click", function (event) {
  832. //event.preventDefault();
  833. const modal = document.getElementById(trigger.dataset.modal);
  834. modal.classList.add("phpdocumentor-modal__open");
  835. loadExternalCodeSnippets(trigger.dataset.line)
  836. const exits = modal.querySelectorAll("[data-exit-button]");
  837. exits.forEach(function (exit) {
  838. exit.addEventListener("click", function (event) {
  839. event.preventDefault();
  840. modal.classList.remove("phpdocumentor-modal__open");
  841. });
  842. });
  843. });
  844. });
  845. </script>
  846. </article>
  847. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  848. <section class="phpdocumentor-search-results__dialog">
  849. <header class="phpdocumentor-search-results__header">
  850. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  851. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  852. </header>
  853. <section class="phpdocumentor-search-results__body">
  854. <ul class="phpdocumentor-search-results__entries"></ul>
  855. </section>
  856. </section>
  857. </section>
  858. </div>
  859. </div>
  860. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  861. </main>
  862. <script>
  863. cssVars({});
  864. </script>
  865. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  866. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  867. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  868. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  869. </body>
  870. </html>