chillerlan-QRCode-Output-QRMarkupSVG.html 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810
  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=Open+Sans:wght@100;200;300;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/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. </section>
  82. <section class="phpdocumentor-sidebar__category">
  83. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  84. <h4 class="phpdocumentor-sidebar__root-namespace">
  85. <a href="packages/Application.html" class="">Application</a>
  86. </h4>
  87. </section>
  88. <section class="phpdocumentor-sidebar__category">
  89. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  92. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  93. </section>
  94. <section class="phpdocumentor-sidebar__category">
  95. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  96. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  97. </section>
  98. </aside>
  99. <div class="phpdocumentor-column -nine phpdocumentor-content">
  100. <section>
  101. <ul class="phpdocumentor-breadcrumbs">
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  103. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  104. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-output.html">Output</a></li>
  105. </ul>
  106. <article class="phpdocumentor-element -class">
  107. <h2 class="phpdocumentor-content__title">
  108. QRMarkupSVG
  109. <span class="phpdocumentor-element__extends">
  110. extends <a href="classes/chillerlan-QRCode-Output-QRMarkup.html"><abbr title="\chillerlan\QRCode\Output\QRMarkup">QRMarkup</abbr></a>
  111. </span>
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. </div>
  121. <aside class="phpdocumentor-element-found-in">
  122. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  123. :
  124. <span class="phpdocumentor-element-found-in__line">24</span>
  125. </aside>
  126. <p class="phpdocumentor-summary">SVG output</p>
  127. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  128. Tags
  129. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  130. </h5>
  131. <dl class="phpdocumentor-tag-list">
  132. <dt class="phpdocumentor-tag-list__entry">
  133. <span class="phpdocumentor-tag__name">see</span>
  134. </dt>
  135. <dd class="phpdocumentor-tag-list__definition">
  136. <span class="phpdocumentor-tag-link"><a href="https://github.com/codemasher/php-qrcode/pull/5">https://github.com/codemasher/php-qrcode/pull/5</a></span>
  137. </dd>
  138. <dt class="phpdocumentor-tag-list__entry">
  139. <span class="phpdocumentor-tag__name">see</span>
  140. </dt>
  141. <dd class="phpdocumentor-tag-list__definition">
  142. <span class="phpdocumentor-tag-link"><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg</a></span>
  143. </dd>
  144. <dt class="phpdocumentor-tag-list__entry">
  145. <span class="phpdocumentor-tag__name">see</span>
  146. </dt>
  147. <dd class="phpdocumentor-tag-list__definition">
  148. <span class="phpdocumentor-tag-link"><a href="https://www.sarasoueidan.com/demos/interactive-svg-coordinate-system/">https://www.sarasoueidan.com/demos/interactive-svg-coordinate-system/</a></span>
  149. </dd>
  150. <dt class="phpdocumentor-tag-list__entry">
  151. <span class="phpdocumentor-tag__name">see</span>
  152. </dt>
  153. <dd class="phpdocumentor-tag-list__definition">
  154. <span class="phpdocumentor-tag-link"><a href="http://apex.infogridpacific.com/SVG/svg-tutorial-contents.html">http://apex.infogridpacific.com/SVG/svg-tutorial-contents.html</a></span>
  155. </dd>
  156. </dl>
  157. <h3 id="toc">
  158. Table of Contents
  159. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  160. </h3>
  161. <h4 id="toc-properties">
  162. Properties
  163. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  164. </h4>
  165. <dl class="phpdocumentor-table-of-contents">
  166. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  167. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length</a>
  168. <span>
  169. &nbsp;: int </span>
  170. </dt>
  171. <dd>the side length of the QR image (modules * scale)</dd>
  172. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  173. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix</a>
  174. <span>
  175. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  176. </dt>
  177. <dd>the (filled) data matrix object</dd>
  178. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  179. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount</a>
  180. <span>
  181. &nbsp;: int </span>
  182. </dt>
  183. <dd>the current size of the QR matrix</dd>
  184. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  185. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues</a>
  186. <span>
  187. &nbsp;: array&lt;string|int, mixed&gt; </span>
  188. </dt>
  189. <dd>an (optional) array of color values for the several QR matrix parts</dd>
  190. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  191. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options</a>
  192. <span>
  193. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a> </span>
  194. </dt>
  195. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  196. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale</a>
  197. <span>
  198. &nbsp;: int </span>
  199. </dt>
  200. <dd>the current scaling for a QR pixel</dd>
  201. </dl>
  202. <h4 id="toc-methods">
  203. Methods
  204. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  205. </h4>
  206. <dl class="phpdocumentor-table-of-contents">
  207. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  208. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a>
  209. <span>
  210. &nbsp;: mixed </span>
  211. </dt>
  212. <dd>QROutputAbstract constructor.</dd>
  213. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  214. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_dump">dump()</a>
  215. <span>
  216. &nbsp;: string </span>
  217. </dt>
  218. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  219. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_moduleValueIsValid">moduleValueIsValid()</a>
  220. <span>
  221. &nbsp;: bool </span>
  222. </dt>
  223. <dd>note: we&#039;re not necessarily validating the several values, just checking the general syntax
  224. note: css4 colors are not included</dd>
  225. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  226. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a>
  227. <span>
  228. &nbsp;: array&lt;string|int, mixed&gt; </span>
  229. </dt>
  230. <dd>collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  231. returns an array with the transformed modules</dd>
  232. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  233. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_createMarkup">createMarkup()</a>
  234. <span>
  235. &nbsp;: string </span>
  236. </dt>
  237. <dd>returns the fully parsed and rendered markup string for the given input</dd>
  238. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  239. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_getCssClass">getCssClass()</a>
  240. <span>
  241. &nbsp;: string </span>
  242. </dt>
  243. <dd>returns a string with all css classes for the current element</dd>
  244. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  245. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a>
  246. <span>
  247. &nbsp;: mixed|null </span>
  248. </dt>
  249. <dd>Returns a default value for either dark or light modules</dd>
  250. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  251. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a>
  252. <span>
  253. &nbsp;: mixed|null </span>
  254. </dt>
  255. <dd>Returns the prepared value for the given $M_TYPE</dd>
  256. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  257. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a>
  258. <span>
  259. &nbsp;: mixed|null </span>
  260. </dt>
  261. <dd>Returns the prepared module value at the given coordinate [$x, $y] (convenience)</dd>
  262. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  263. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_header">header()</a>
  264. <span>
  265. &nbsp;: string </span>
  266. </dt>
  267. <dd>returns the &lt;svg&gt; header with the given options parsed</dd>
  268. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  269. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_module">module()</a>
  270. <span>
  271. &nbsp;: string </span>
  272. </dt>
  273. <dd>returns a path segment for a single module</dd>
  274. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  275. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_path">path()</a>
  276. <span>
  277. &nbsp;: string </span>
  278. </dt>
  279. <dd>renders and returns a single &lt;path&gt; element</dd>
  280. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  281. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_paths">paths()</a>
  282. <span>
  283. &nbsp;: string </span>
  284. </dt>
  285. <dd>returns one or more SVG &lt;path&gt; elements</dd>
  286. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  287. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a>
  288. <span>
  289. &nbsp;: mixed|null </span>
  290. </dt>
  291. <dd>Prepares the value for the given input ()</dd>
  292. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  293. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  294. <span>
  295. &nbsp;: void </span>
  296. </dt>
  297. <dd>Saves the qr $data to a $file. If $file is null, nothing happens.</dd>
  298. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  299. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a>
  300. <span>
  301. &nbsp;: void </span>
  302. </dt>
  303. <dd>Sets/updates the matrix dimensions</dd>
  304. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  305. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  306. <span>
  307. &nbsp;: void </span>
  308. </dt>
  309. <dd>Sets the initial module values</dd>
  310. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  311. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a>
  312. <span>
  313. &nbsp;: string </span>
  314. </dt>
  315. <dd>Returns a base64 data URI for the given string and mime type</dd>
  316. </dl>
  317. <section class="phpdocumentor-properties">
  318. <h3 class="phpdocumentor-elements__header" id="properties">
  319. Properties
  320. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  321. </h3>
  322. <article
  323. class="
  324. phpdocumentor-element
  325. -property
  326. -protected
  327. "
  328. >
  329. <h4 class="phpdocumentor-element__name" id="property_length">
  330. $length
  331. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  332. <span class="phpdocumentor-element__modifiers">
  333. </span>
  334. </h4>
  335. <aside class="phpdocumentor-element-found-in">
  336. <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>
  337. :
  338. <span class="phpdocumentor-element-found-in__line">40</span>
  339. </aside>
  340. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  341. <code class="phpdocumentor-code phpdocumentor-signature ">
  342. <span class="phpdocumentor-signature__visibility">protected</span>
  343. <span class="phpdocumentor-signature__type">int</span>
  344. <span class="phpdocumentor-signature__name">$length</span>
  345. </code>
  346. </article>
  347. <article
  348. class="
  349. phpdocumentor-element
  350. -property
  351. -protected
  352. "
  353. >
  354. <h4 class="phpdocumentor-element__name" id="property_matrix">
  355. $matrix
  356. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  357. <span class="phpdocumentor-element__modifiers">
  358. </span>
  359. </h4>
  360. <aside class="phpdocumentor-element-found-in">
  361. <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>
  362. :
  363. <span class="phpdocumentor-element-found-in__line">50</span>
  364. </aside>
  365. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  366. <code class="phpdocumentor-code phpdocumentor-signature ">
  367. <span class="phpdocumentor-signature__visibility">protected</span>
  368. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  369. <span class="phpdocumentor-signature__name">$matrix</span>
  370. </code>
  371. </article>
  372. <article
  373. class="
  374. phpdocumentor-element
  375. -property
  376. -protected
  377. "
  378. >
  379. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  380. $moduleCount
  381. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" class="headerlink"><i class="fas fa-link"></i></a>
  382. <span class="phpdocumentor-element__modifiers">
  383. </span>
  384. </h4>
  385. <aside class="phpdocumentor-element-found-in">
  386. <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>
  387. :
  388. <span class="phpdocumentor-element-found-in__line">28</span>
  389. </aside>
  390. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  391. <code class="phpdocumentor-code phpdocumentor-signature ">
  392. <span class="phpdocumentor-signature__visibility">protected</span>
  393. <span class="phpdocumentor-signature__type">int</span>
  394. <span class="phpdocumentor-signature__name">$moduleCount</span>
  395. </code>
  396. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  397. Tags
  398. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount#tags" class="headerlink"><i class="fas fa-link"></i></a>
  399. </h5>
  400. <dl class="phpdocumentor-tag-list">
  401. <dt class="phpdocumentor-tag-list__entry">
  402. <span class="phpdocumentor-tag__name">see</span>
  403. </dt>
  404. <dd class="phpdocumentor-tag-list__definition">
  405. <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>
  406. </dd>
  407. </dl>
  408. </article>
  409. <article
  410. class="
  411. phpdocumentor-element
  412. -property
  413. -protected
  414. "
  415. >
  416. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  417. $moduleValues
  418. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  419. <span class="phpdocumentor-element__modifiers">
  420. </span>
  421. </h4>
  422. <aside class="phpdocumentor-element-found-in">
  423. <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>
  424. :
  425. <span class="phpdocumentor-element-found-in__line">45</span>
  426. </aside>
  427. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  428. <code class="phpdocumentor-code phpdocumentor-signature ">
  429. <span class="phpdocumentor-signature__visibility">protected</span>
  430. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  431. <span class="phpdocumentor-signature__name">$moduleValues</span>
  432. </code>
  433. </article>
  434. <article
  435. class="
  436. phpdocumentor-element
  437. -property
  438. -protected
  439. "
  440. >
  441. <h4 class="phpdocumentor-element__name" id="property_options">
  442. $options
  443. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  444. <span class="phpdocumentor-element__modifiers">
  445. </span>
  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">55</span>
  451. </aside>
  452. <code class="phpdocumentor-code phpdocumentor-signature ">
  453. <span class="phpdocumentor-signature__visibility">protected</span>
  454. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  455. <span class="phpdocumentor-signature__name">$options</span>
  456. </code>
  457. </article>
  458. <article
  459. class="
  460. phpdocumentor-element
  461. -property
  462. -protected
  463. "
  464. >
  465. <h4 class="phpdocumentor-element__name" id="property_scale">
  466. $scale
  467. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  468. <span class="phpdocumentor-element__modifiers">
  469. </span>
  470. </h4>
  471. <aside class="phpdocumentor-element-found-in">
  472. <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>
  473. :
  474. <span class="phpdocumentor-element-found-in__line">35</span>
  475. </aside>
  476. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  477. <code class="phpdocumentor-code phpdocumentor-signature ">
  478. <span class="phpdocumentor-signature__visibility">protected</span>
  479. <span class="phpdocumentor-signature__type">int</span>
  480. <span class="phpdocumentor-signature__name">$scale</span>
  481. </code>
  482. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  483. Tags
  484. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale#tags" class="headerlink"><i class="fas fa-link"></i></a>
  485. </h5>
  486. <dl class="phpdocumentor-tag-list">
  487. <dt class="phpdocumentor-tag-list__entry">
  488. <span class="phpdocumentor-tag__name">see</span>
  489. </dt>
  490. <dd class="phpdocumentor-tag-list__definition">
  491. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  492. </dd>
  493. </dl>
  494. </article>
  495. </section>
  496. <section class="phpdocumentor-methods">
  497. <h3 class="phpdocumentor-elements__header" id="methods">
  498. Methods
  499. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  500. </h3>
  501. <article
  502. class="phpdocumentor-element
  503. -method
  504. -public
  505. "
  506. >
  507. <h4 class="phpdocumentor-element__name" id="method___construct">
  508. __construct()
  509. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  510. </h4>
  511. <aside class="phpdocumentor-element-found-in">
  512. <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>
  513. :
  514. <span class="phpdocumentor-element-found-in__line">60</span>
  515. </aside>
  516. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  517. <code class="phpdocumentor-code phpdocumentor-signature ">
  518. <span class="phpdocumentor-signature__visibility">public</span>
  519. <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>
  520. <div class="phpdocumentor-label-line">
  521. </div>
  522. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  523. <dl class="phpdocumentor-argument-list">
  524. <dt class="phpdocumentor-argument-list__entry">
  525. <span class="phpdocumentor-signature__argument__name">$options</span>
  526. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  527. </dt>
  528. <dd class="phpdocumentor-argument-list__definition">
  529. </dd>
  530. <dt class="phpdocumentor-argument-list__entry">
  531. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  532. : <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>
  533. </dt>
  534. <dd class="phpdocumentor-argument-list__definition">
  535. </dd>
  536. </dl>
  537. </article>
  538. <article
  539. class="phpdocumentor-element
  540. -method
  541. -public
  542. "
  543. >
  544. <h4 class="phpdocumentor-element__name" id="method_dump">
  545. dump()
  546. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_dump" class="headerlink"><i class="fas fa-link"></i></a>
  547. </h4>
  548. <aside class="phpdocumentor-element-found-in">
  549. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkup.php"><a href="files/src-output-qrmarkup.html"><abbr title="src/Output/QRMarkup.php">QRMarkup.php</abbr></a></abbr>
  550. :
  551. <span class="phpdocumentor-element-found-in__line">74</span>
  552. </aside>
  553. <code class="phpdocumentor-code phpdocumentor-signature ">
  554. <span class="phpdocumentor-signature__visibility">public</span>
  555. <span class="phpdocumentor-signature__name">dump</span><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">$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">string</span></code>
  556. <div class="phpdocumentor-label-line">
  557. </div>
  558. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  559. <dl class="phpdocumentor-argument-list">
  560. <dt class="phpdocumentor-argument-list__entry">
  561. <span class="phpdocumentor-signature__argument__name">$file</span>
  562. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  563. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  564. <dd class="phpdocumentor-argument-list__definition">
  565. </dd>
  566. </dl>
  567. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  568. Tags
  569. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_dump#tags" class="headerlink"><i class="fas fa-link"></i></a>
  570. </h5>
  571. <dl class="phpdocumentor-tag-list">
  572. <dt class="phpdocumentor-tag-list__entry">
  573. <span class="phpdocumentor-tag__name">inheritDoc</span>
  574. </dt>
  575. <dd class="phpdocumentor-tag-list__definition">
  576. </dd>
  577. </dl>
  578. <section>
  579. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  580. <span class="phpdocumentor-signature__response_type">string</span>
  581. </section>
  582. </article>
  583. <article
  584. class="phpdocumentor-element
  585. -method
  586. -public
  587. -static "
  588. >
  589. <h4 class="phpdocumentor-element__name" id="method_moduleValueIsValid">
  590. moduleValueIsValid()
  591. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_moduleValueIsValid" class="headerlink"><i class="fas fa-link"></i></a>
  592. </h4>
  593. <aside class="phpdocumentor-element-found-in">
  594. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  595. :
  596. <span class="phpdocumentor-element-found-in__line">32</span>
  597. </aside>
  598. <p class="phpdocumentor-summary">note: we&#039;re not necessarily validating the several values, just checking the general syntax
  599. note: css4 colors are not included</p>
  600. <code class="phpdocumentor-code phpdocumentor-signature ">
  601. <span class="phpdocumentor-signature__visibility">public</span>
  602. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">moduleValueIsValid</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">bool</span></code>
  603. <div class="phpdocumentor-label-line">
  604. </div>
  605. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  606. <dl class="phpdocumentor-argument-list">
  607. <dt class="phpdocumentor-argument-list__entry">
  608. <span class="phpdocumentor-signature__argument__name">$value</span>
  609. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  610. </dt>
  611. <dd class="phpdocumentor-argument-list__definition">
  612. </dd>
  613. </dl>
  614. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  615. Tags
  616. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_moduleValueIsValid#tags" class="headerlink"><i class="fas fa-link"></i></a>
  617. </h5>
  618. <dl class="phpdocumentor-tag-list">
  619. <dt class="phpdocumentor-tag-list__entry">
  620. <span class="phpdocumentor-tag__name">todo:</span>
  621. </dt>
  622. <dd class="phpdocumentor-tag-list__definition">
  623. <section class="phpdocumentor-description"><p>XSS proof</p>
  624. </section>
  625. </dd>
  626. <dt class="phpdocumentor-tag-list__entry">
  627. <span class="phpdocumentor-tag__name">see</span>
  628. </dt>
  629. <dd class="phpdocumentor-tag-list__definition">
  630. <span class="phpdocumentor-tag-link"><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill">https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill</a></span>
  631. </dd>
  632. <dt class="phpdocumentor-tag-list__entry">
  633. <span class="phpdocumentor-tag__name">inheritDoc</span>
  634. </dt>
  635. <dd class="phpdocumentor-tag-list__definition">
  636. </dd>
  637. </dl>
  638. <section>
  639. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  640. <span class="phpdocumentor-signature__response_type">bool</span>
  641. </section>
  642. </article>
  643. <article
  644. class="phpdocumentor-element
  645. -method
  646. -protected
  647. "
  648. >
  649. <h4 class="phpdocumentor-element__name" id="method_collectModules">
  650. collectModules()
  651. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules" class="headerlink"><i class="fas fa-link"></i></a>
  652. </h4>
  653. <aside class="phpdocumentor-element-found-in">
  654. <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>
  655. :
  656. <span class="phpdocumentor-element-found-in__line">180</span>
  657. </aside>
  658. <p class="phpdocumentor-summary">collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  659. returns an array with the transformed modules</p>
  660. <code class="phpdocumentor-code phpdocumentor-signature ">
  661. <span class="phpdocumentor-signature__visibility">protected</span>
  662. <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>
  663. <div class="phpdocumentor-label-line">
  664. </div>
  665. <section class="phpdocumentor-description"><p>The transform callback is called with the following parameters:</p>
  666. <p>$x - current column
  667. $y - current row
  668. $M_TYPE - field value
  669. $M_TYPE_LAYER - (possibly modified) field value that acts as layer id</p>
  670. </section>
  671. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  672. <dl class="phpdocumentor-argument-list">
  673. <dt class="phpdocumentor-argument-list__entry">
  674. <span class="phpdocumentor-signature__argument__name">$transform</span>
  675. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  676. </dt>
  677. <dd class="phpdocumentor-argument-list__definition">
  678. </dd>
  679. </dl>
  680. <section>
  681. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  682. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  683. </section>
  684. </article>
  685. <article
  686. class="phpdocumentor-element
  687. -method
  688. -protected
  689. "
  690. >
  691. <h4 class="phpdocumentor-element__name" id="method_createMarkup">
  692. createMarkup()
  693. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_createMarkup" class="headerlink"><i class="fas fa-link"></i></a>
  694. </h4>
  695. <aside class="phpdocumentor-element-found-in">
  696. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  697. :
  698. <span class="phpdocumentor-element-found-in__line">52</span>
  699. </aside>
  700. <p class="phpdocumentor-summary">returns the fully parsed and rendered markup string for the given input</p>
  701. <code class="phpdocumentor-code phpdocumentor-signature ">
  702. <span class="phpdocumentor-signature__visibility">protected</span>
  703. <span class="phpdocumentor-signature__name">createMarkup</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$saveToFile</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  704. <div class="phpdocumentor-label-line">
  705. </div>
  706. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  707. <dl class="phpdocumentor-argument-list">
  708. <dt class="phpdocumentor-argument-list__entry">
  709. <span class="phpdocumentor-signature__argument__name">$saveToFile</span>
  710. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  711. </dt>
  712. <dd class="phpdocumentor-argument-list__definition">
  713. </dd>
  714. </dl>
  715. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  716. Tags
  717. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_createMarkup#tags" class="headerlink"><i class="fas fa-link"></i></a>
  718. </h5>
  719. <dl class="phpdocumentor-tag-list">
  720. <dt class="phpdocumentor-tag-list__entry">
  721. <span class="phpdocumentor-tag__name">inheritDoc</span>
  722. </dt>
  723. <dd class="phpdocumentor-tag-list__definition">
  724. </dd>
  725. </dl>
  726. <section>
  727. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  728. <span class="phpdocumentor-signature__response_type">string</span>
  729. </section>
  730. </article>
  731. <article
  732. class="phpdocumentor-element
  733. -method
  734. -protected
  735. "
  736. >
  737. <h4 class="phpdocumentor-element__name" id="method_getCssClass">
  738. getCssClass()
  739. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_getCssClass" class="headerlink"><i class="fas fa-link"></i></a>
  740. </h4>
  741. <aside class="phpdocumentor-element-found-in">
  742. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  743. :
  744. <span class="phpdocumentor-element-found-in__line">150</span>
  745. </aside>
  746. <p class="phpdocumentor-summary">returns a string with all css classes for the current element</p>
  747. <code class="phpdocumentor-code phpdocumentor-signature ">
  748. <span class="phpdocumentor-signature__visibility">protected</span>
  749. <span class="phpdocumentor-signature__name">getCssClass</span><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">$M_TYPE</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">0</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  750. <div class="phpdocumentor-label-line">
  751. </div>
  752. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  753. <dl class="phpdocumentor-argument-list">
  754. <dt class="phpdocumentor-argument-list__entry">
  755. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  756. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  757. = <span class="phpdocumentor-signature__argument__default-value">0</span> </dt>
  758. <dd class="phpdocumentor-argument-list__definition">
  759. </dd>
  760. </dl>
  761. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  762. Tags
  763. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_getCssClass#tags" class="headerlink"><i class="fas fa-link"></i></a>
  764. </h5>
  765. <dl class="phpdocumentor-tag-list">
  766. <dt class="phpdocumentor-tag-list__entry">
  767. <span class="phpdocumentor-tag__name">inheritDoc</span>
  768. </dt>
  769. <dd class="phpdocumentor-tag-list__definition">
  770. </dd>
  771. </dl>
  772. <section>
  773. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  774. <span class="phpdocumentor-signature__response_type">string</span>
  775. </section>
  776. </article>
  777. <article
  778. class="phpdocumentor-element
  779. -method
  780. -protected
  781. -abstract "
  782. >
  783. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  784. getDefaultModuleValue()
  785. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  786. </h4>
  787. <aside class="phpdocumentor-element-found-in">
  788. <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>
  789. :
  790. <span class="phpdocumentor-element-found-in__line">137</span>
  791. </aside>
  792. <p class="phpdocumentor-summary">Returns a default value for either dark or light modules</p>
  793. <code class="phpdocumentor-code phpdocumentor-signature ">
  794. <span class="phpdocumentor-signature__visibility">protected</span>
  795. <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>
  796. <div class="phpdocumentor-label-line">
  797. </div>
  798. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  799. <dl class="phpdocumentor-argument-list">
  800. <dt class="phpdocumentor-argument-list__entry">
  801. <span class="phpdocumentor-signature__argument__name">$isDark</span>
  802. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  803. </dt>
  804. <dd class="phpdocumentor-argument-list__definition">
  805. </dd>
  806. </dl>
  807. <section>
  808. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  809. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  810. &mdash;
  811. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  812. </section>
  813. </section>
  814. </article>
  815. <article
  816. class="phpdocumentor-element
  817. -method
  818. -protected
  819. "
  820. >
  821. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  822. getModuleValue()
  823. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  824. </h4>
  825. <aside class="phpdocumentor-element-found-in">
  826. <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>
  827. :
  828. <span class="phpdocumentor-element-found-in__line">104</span>
  829. </aside>
  830. <p class="phpdocumentor-summary">Returns the prepared value for the given $M_TYPE</p>
  831. <code class="phpdocumentor-code phpdocumentor-signature ">
  832. <span class="phpdocumentor-signature__visibility">protected</span>
  833. <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>
  834. <div class="phpdocumentor-label-line">
  835. </div>
  836. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  837. <dl class="phpdocumentor-argument-list">
  838. <dt class="phpdocumentor-argument-list__entry">
  839. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  840. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  841. </dt>
  842. <dd class="phpdocumentor-argument-list__definition">
  843. </dd>
  844. </dl>
  845. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  846. Tags
  847. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue#tags" class="headerlink"><i class="fas fa-link"></i></a>
  848. </h5>
  849. <dl class="phpdocumentor-tag-list">
  850. <dt class="phpdocumentor-tag-list__entry">
  851. <span class="phpdocumentor-tag__name">throws</span>
  852. </dt>
  853. <dd class="phpdocumentor-tag-list__definition">
  854. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  855. </dd>
  856. </dl>
  857. <section>
  858. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  859. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  860. &mdash;
  861. <section class="phpdocumentor-description"><p>return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist</p>
  862. </section>
  863. </section>
  864. </article>
  865. <article
  866. class="phpdocumentor-element
  867. -method
  868. -protected
  869. "
  870. >
  871. <h4 class="phpdocumentor-element__name" id="method_getModuleValueAt">
  872. getModuleValueAt()
  873. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt" class="headerlink"><i class="fas fa-link"></i></a>
  874. </h4>
  875. <aside class="phpdocumentor-element-found-in">
  876. <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>
  877. :
  878. <span class="phpdocumentor-element-found-in__line">119</span>
  879. </aside>
  880. <p class="phpdocumentor-summary">Returns the prepared module value at the given coordinate [$x, $y] (convenience)</p>
  881. <code class="phpdocumentor-code phpdocumentor-signature ">
  882. <span class="phpdocumentor-signature__visibility">protected</span>
  883. <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>
  884. <div class="phpdocumentor-label-line">
  885. </div>
  886. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  887. <dl class="phpdocumentor-argument-list">
  888. <dt class="phpdocumentor-argument-list__entry">
  889. <span class="phpdocumentor-signature__argument__name">$x</span>
  890. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  891. </dt>
  892. <dd class="phpdocumentor-argument-list__definition">
  893. </dd>
  894. <dt class="phpdocumentor-argument-list__entry">
  895. <span class="phpdocumentor-signature__argument__name">$y</span>
  896. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  897. </dt>
  898. <dd class="phpdocumentor-argument-list__definition">
  899. </dd>
  900. </dl>
  901. <section>
  902. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  903. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  904. </section>
  905. </article>
  906. <article
  907. class="phpdocumentor-element
  908. -method
  909. -protected
  910. "
  911. >
  912. <h4 class="phpdocumentor-element__name" id="method_header">
  913. header()
  914. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_header" class="headerlink"><i class="fas fa-link"></i></a>
  915. </h4>
  916. <aside class="phpdocumentor-element-found-in">
  917. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  918. :
  919. <span class="phpdocumentor-element-found-in__line">75</span>
  920. </aside>
  921. <p class="phpdocumentor-summary">returns the &lt;svg&gt; header with the given options parsed</p>
  922. <code class="phpdocumentor-code phpdocumentor-signature ">
  923. <span class="phpdocumentor-signature__visibility">protected</span>
  924. <span class="phpdocumentor-signature__name">header</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  925. <div class="phpdocumentor-label-line">
  926. </div>
  927. <section>
  928. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  929. <span class="phpdocumentor-signature__response_type">string</span>
  930. </section>
  931. </article>
  932. <article
  933. class="phpdocumentor-element
  934. -method
  935. -protected
  936. "
  937. >
  938. <h4 class="phpdocumentor-element__name" id="method_module">
  939. module()
  940. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_module" class="headerlink"><i class="fas fa-link"></i></a>
  941. </h4>
  942. <aside class="phpdocumentor-element-found-in">
  943. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  944. :
  945. <span class="phpdocumentor-element-found-in__line">163</span>
  946. </aside>
  947. <p class="phpdocumentor-summary">returns a path segment for a single module</p>
  948. <code class="phpdocumentor-code phpdocumentor-signature ">
  949. <span class="phpdocumentor-signature__visibility">protected</span>
  950. <span class="phpdocumentor-signature__name">module</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 class="phpdocumentor-signature__argument"><span>, </span><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">string</span></code>
  951. <div class="phpdocumentor-label-line">
  952. </div>
  953. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  954. <dl class="phpdocumentor-argument-list">
  955. <dt class="phpdocumentor-argument-list__entry">
  956. <span class="phpdocumentor-signature__argument__name">$x</span>
  957. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  958. </dt>
  959. <dd class="phpdocumentor-argument-list__definition">
  960. </dd>
  961. <dt class="phpdocumentor-argument-list__entry">
  962. <span class="phpdocumentor-signature__argument__name">$y</span>
  963. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  964. </dt>
  965. <dd class="phpdocumentor-argument-list__definition">
  966. </dd>
  967. <dt class="phpdocumentor-argument-list__entry">
  968. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  969. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  970. </dt>
  971. <dd class="phpdocumentor-argument-list__definition">
  972. </dd>
  973. </dl>
  974. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  975. Tags
  976. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_module#tags" class="headerlink"><i class="fas fa-link"></i></a>
  977. </h5>
  978. <dl class="phpdocumentor-tag-list">
  979. <dt class="phpdocumentor-tag-list__entry">
  980. <span class="phpdocumentor-tag__name">see</span>
  981. </dt>
  982. <dd class="phpdocumentor-tag-list__definition">
  983. <span class="phpdocumentor-tag-link"><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d">https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d</a></span>
  984. </dd>
  985. </dl>
  986. <section>
  987. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  988. <span class="phpdocumentor-signature__response_type">string</span>
  989. </section>
  990. </article>
  991. <article
  992. class="phpdocumentor-element
  993. -method
  994. -protected
  995. "
  996. >
  997. <h4 class="phpdocumentor-element__name" id="method_path">
  998. path()
  999. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_path" class="headerlink"><i class="fas fa-link"></i></a>
  1000. </h4>
  1001. <aside class="phpdocumentor-element-found-in">
  1002. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  1003. :
  1004. <span class="phpdocumentor-element-found-in__line">131</span>
  1005. </aside>
  1006. <p class="phpdocumentor-summary">renders and returns a single &lt;path&gt; element</p>
  1007. <code class="phpdocumentor-code phpdocumentor-signature ">
  1008. <span class="phpdocumentor-signature__visibility">protected</span>
  1009. <span class="phpdocumentor-signature__name">path</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$path</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">$M_TYPE</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  1010. <div class="phpdocumentor-label-line">
  1011. </div>
  1012. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1013. <dl class="phpdocumentor-argument-list">
  1014. <dt class="phpdocumentor-argument-list__entry">
  1015. <span class="phpdocumentor-signature__argument__name">$path</span>
  1016. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1017. </dt>
  1018. <dd class="phpdocumentor-argument-list__definition">
  1019. </dd>
  1020. <dt class="phpdocumentor-argument-list__entry">
  1021. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  1022. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1023. </dt>
  1024. <dd class="phpdocumentor-argument-list__definition">
  1025. </dd>
  1026. </dl>
  1027. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1028. Tags
  1029. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_path#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1030. </h5>
  1031. <dl class="phpdocumentor-tag-list">
  1032. <dt class="phpdocumentor-tag-list__entry">
  1033. <span class="phpdocumentor-tag__name">see</span>
  1034. </dt>
  1035. <dd class="phpdocumentor-tag-list__definition">
  1036. <span class="phpdocumentor-tag-link"><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path</a></span>
  1037. </dd>
  1038. </dl>
  1039. <section>
  1040. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1041. <span class="phpdocumentor-signature__response_type">string</span>
  1042. </section>
  1043. </article>
  1044. <article
  1045. class="phpdocumentor-element
  1046. -method
  1047. -protected
  1048. "
  1049. >
  1050. <h4 class="phpdocumentor-element__name" id="method_paths">
  1051. paths()
  1052. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_paths" class="headerlink"><i class="fas fa-link"></i></a>
  1053. </h4>
  1054. <aside class="phpdocumentor-element-found-in">
  1055. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkupSVG.php"><a href="files/src-output-qrmarkupsvg.html"><abbr title="src/Output/QRMarkupSVG.php">QRMarkupSVG.php</abbr></a></abbr>
  1056. :
  1057. <span class="phpdocumentor-element-found-in__line">100</span>
  1058. </aside>
  1059. <p class="phpdocumentor-summary">returns one or more SVG &lt;path&gt; elements</p>
  1060. <code class="phpdocumentor-code phpdocumentor-signature ">
  1061. <span class="phpdocumentor-signature__visibility">protected</span>
  1062. <span class="phpdocumentor-signature__name">paths</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  1063. <div class="phpdocumentor-label-line">
  1064. </div>
  1065. <section>
  1066. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1067. <span class="phpdocumentor-signature__response_type">string</span>
  1068. </section>
  1069. </article>
  1070. <article
  1071. class="phpdocumentor-element
  1072. -method
  1073. -protected
  1074. -abstract "
  1075. >
  1076. <h4 class="phpdocumentor-element__name" id="method_prepareModuleValue">
  1077. prepareModuleValue()
  1078. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  1079. </h4>
  1080. <aside class="phpdocumentor-element-found-in">
  1081. <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>
  1082. :
  1083. <span class="phpdocumentor-element-found-in__line">130</span>
  1084. </aside>
  1085. <p class="phpdocumentor-summary">Prepares the value for the given input ()</p>
  1086. <code class="phpdocumentor-code phpdocumentor-signature ">
  1087. <span class="phpdocumentor-signature__visibility">protected</span>
  1088. <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>
  1089. <div class="phpdocumentor-label-line">
  1090. </div>
  1091. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1092. <dl class="phpdocumentor-argument-list">
  1093. <dt class="phpdocumentor-argument-list__entry">
  1094. <span class="phpdocumentor-signature__argument__name">$value</span>
  1095. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  1096. </dt>
  1097. <dd class="phpdocumentor-argument-list__definition">
  1098. </dd>
  1099. </dl>
  1100. <section>
  1101. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1102. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  1103. &mdash;
  1104. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  1105. </section>
  1106. </section>
  1107. </article>
  1108. <article
  1109. class="phpdocumentor-element
  1110. -method
  1111. -protected
  1112. "
  1113. >
  1114. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  1115. saveToFile()
  1116. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" class="headerlink"><i class="fas fa-link"></i></a>
  1117. </h4>
  1118. <aside class="phpdocumentor-element-found-in">
  1119. <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>
  1120. :
  1121. <span class="phpdocumentor-element-found-in__line">154</span>
  1122. </aside>
  1123. <p class="phpdocumentor-summary">Saves the qr $data to a $file. If $file is null, nothing happens.</p>
  1124. <code class="phpdocumentor-code phpdocumentor-signature ">
  1125. <span class="phpdocumentor-signature__visibility">protected</span>
  1126. <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>
  1127. <div class="phpdocumentor-label-line">
  1128. </div>
  1129. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1130. <dl class="phpdocumentor-argument-list">
  1131. <dt class="phpdocumentor-argument-list__entry">
  1132. <span class="phpdocumentor-signature__argument__name">$data</span>
  1133. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1134. </dt>
  1135. <dd class="phpdocumentor-argument-list__definition">
  1136. </dd>
  1137. <dt class="phpdocumentor-argument-list__entry">
  1138. <span class="phpdocumentor-signature__argument__name">$file</span>
  1139. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1140. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  1141. <dd class="phpdocumentor-argument-list__definition">
  1142. </dd>
  1143. </dl>
  1144. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1145. Tags
  1146. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1147. </h5>
  1148. <dl class="phpdocumentor-tag-list">
  1149. <dt class="phpdocumentor-tag-list__entry">
  1150. <span class="phpdocumentor-tag__name">see</span>
  1151. </dt>
  1152. <dd class="phpdocumentor-tag-list__definition">
  1153. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  1154. </dd>
  1155. <dt class="phpdocumentor-tag-list__entry">
  1156. <span class="phpdocumentor-tag__name">see</span>
  1157. </dt>
  1158. <dd class="phpdocumentor-tag-list__definition">
  1159. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$cachefile">QROptions::$cachefile</abbr></span>
  1160. </dd>
  1161. <dt class="phpdocumentor-tag-list__entry">
  1162. <span class="phpdocumentor-tag__name">throws</span>
  1163. </dt>
  1164. <dd class="phpdocumentor-tag-list__definition">
  1165. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  1166. </dd>
  1167. </dl>
  1168. </article>
  1169. <article
  1170. class="phpdocumentor-element
  1171. -method
  1172. -protected
  1173. "
  1174. >
  1175. <h4 class="phpdocumentor-element__name" id="method_setMatrixDimensions">
  1176. setMatrixDimensions()
  1177. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  1178. </h4>
  1179. <aside class="phpdocumentor-element-found-in">
  1180. <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>
  1181. :
  1182. <span class="phpdocumentor-element-found-in__line">77</span>
  1183. </aside>
  1184. <p class="phpdocumentor-summary">Sets/updates the matrix dimensions</p>
  1185. <code class="phpdocumentor-code phpdocumentor-signature ">
  1186. <span class="phpdocumentor-signature__visibility">protected</span>
  1187. <span class="phpdocumentor-signature__name">setMatrixDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1188. <div class="phpdocumentor-label-line">
  1189. </div>
  1190. <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>
  1191. </section>
  1192. </article>
  1193. <article
  1194. class="phpdocumentor-element
  1195. -method
  1196. -protected
  1197. "
  1198. >
  1199. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  1200. setModuleValues()
  1201. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  1202. </h4>
  1203. <aside class="phpdocumentor-element-found-in">
  1204. <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>
  1205. :
  1206. <span class="phpdocumentor-element-found-in__line">86</span>
  1207. </aside>
  1208. <p class="phpdocumentor-summary">Sets the initial module values</p>
  1209. <code class="phpdocumentor-code phpdocumentor-signature ">
  1210. <span class="phpdocumentor-signature__visibility">protected</span>
  1211. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1212. <div class="phpdocumentor-label-line">
  1213. </div>
  1214. </article>
  1215. <article
  1216. class="phpdocumentor-element
  1217. -method
  1218. -protected
  1219. "
  1220. >
  1221. <h4 class="phpdocumentor-element__name" id="method_toBase64DataURI">
  1222. toBase64DataURI()
  1223. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI" class="headerlink"><i class="fas fa-link"></i></a>
  1224. </h4>
  1225. <aside class="phpdocumentor-element-found-in">
  1226. <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>
  1227. :
  1228. <span class="phpdocumentor-element-found-in__line">142</span>
  1229. </aside>
  1230. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  1231. <code class="phpdocumentor-code phpdocumentor-signature ">
  1232. <span class="phpdocumentor-signature__visibility">protected</span>
  1233. <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>
  1234. <div class="phpdocumentor-label-line">
  1235. </div>
  1236. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1237. <dl class="phpdocumentor-argument-list">
  1238. <dt class="phpdocumentor-argument-list__entry">
  1239. <span class="phpdocumentor-signature__argument__name">$data</span>
  1240. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1241. </dt>
  1242. <dd class="phpdocumentor-argument-list__definition">
  1243. </dd>
  1244. <dt class="phpdocumentor-argument-list__entry">
  1245. <span class="phpdocumentor-signature__argument__name">$mime</span>
  1246. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1247. </dt>
  1248. <dd class="phpdocumentor-argument-list__definition">
  1249. </dd>
  1250. </dl>
  1251. <section>
  1252. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1253. <span class="phpdocumentor-signature__response_type">string</span>
  1254. </section>
  1255. </article>
  1256. </section>
  1257. <div class="phpdocumentor-modal" id="source-view">
  1258. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  1259. <div class="phpdocumentor-modal-container">
  1260. <div class="phpdocumentor-modal-content">
  1261. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Output/QRMarkupSVG.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  1262. </div>
  1263. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  1264. </div>
  1265. </div>
  1266. <script type="text/javascript">
  1267. (function () {
  1268. function loadExternalCodeSnippet(el, url, line) {
  1269. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1270. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  1271. const language = 'php';
  1272. const code = document.createElement('code');
  1273. code.className = 'language-' + language;
  1274. pre.textContent = '';
  1275. pre.setAttribute('data-line', line)
  1276. code.textContent = 'Loading…';
  1277. pre.appendChild(code);
  1278. var xhr = new XMLHttpRequest();
  1279. xhr.open('GET', src, true);
  1280. xhr.onreadystatechange = function () {
  1281. if (xhr.readyState !== 4) {
  1282. return;
  1283. }
  1284. if (xhr.status < 400 && xhr.responseText) {
  1285. code.textContent = xhr.responseText;
  1286. Prism.highlightElement(code);
  1287. return;
  1288. }
  1289. if (xhr.status === 404) {
  1290. code.textContent = '✖ Error: File could not be found';
  1291. return;
  1292. }
  1293. if (xhr.status >= 400) {
  1294. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1295. return;
  1296. }
  1297. code.textContent = '✖ Error: An unknown error occurred';
  1298. };
  1299. xhr.send(null);
  1300. });
  1301. }
  1302. const modalButtons = document.querySelectorAll("[data-modal]");
  1303. const openedAsLocalFile = window.location.protocol === 'file:';
  1304. if (modalButtons.length > 0 && openedAsLocalFile) {
  1305. console.warn(
  1306. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  1307. 'browsers block XHR requests when a page is opened this way'
  1308. );
  1309. }
  1310. modalButtons.forEach(function (trigger) {
  1311. if (openedAsLocalFile) {
  1312. trigger.setAttribute("hidden", "hidden");
  1313. }
  1314. trigger.addEventListener("click", function (event) {
  1315. event.preventDefault();
  1316. const modal = document.getElementById(trigger.dataset.modal);
  1317. if (!modal) {
  1318. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  1319. return;
  1320. }
  1321. modal.classList.add("phpdocumentor-modal__open");
  1322. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  1323. const exits = modal.querySelectorAll("[data-exit-button]");
  1324. exits.forEach(function (exit) {
  1325. exit.addEventListener("click", function (event) {
  1326. event.preventDefault();
  1327. modal.classList.remove("phpdocumentor-modal__open");
  1328. });
  1329. });
  1330. });
  1331. });
  1332. })();
  1333. </script>
  1334. </article>
  1335. </section>
  1336. <section class="phpdocumentor-on-this-page__sidebar">
  1337. <section class="phpdocumentor-on-this-page__content">
  1338. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  1339. <ul class="phpdocumentor-list -clean">
  1340. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  1341. <li>
  1342. <ul class="phpdocumentor-list -clean">
  1343. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#toc-properties">Properties</a></li>
  1344. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#toc-methods">Methods</a></li>
  1345. </ul>
  1346. </li>
  1347. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  1348. <li>
  1349. <ul class="phpdocumentor-list -clean">
  1350. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length<a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html"></li>
  1351. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix<a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html"></li>
  1352. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount<a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html"></li>
  1353. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues<a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html"></li>
  1354. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options<a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html"></li>
  1355. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale<a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html"></li>
  1356. </ul>
  1357. </li>
  1358. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  1359. <li>
  1360. <ul class="phpdocumentor-list -clean">
  1361. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a></li>
  1362. <li><a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_dump">dump()</a></li>
  1363. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_moduleValueIsValid">moduleValueIsValid()</a></li>
  1364. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a></li>
  1365. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_createMarkup">createMarkup()</a></li>
  1366. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_getCssClass">getCssClass()</a></li>
  1367. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a></li>
  1368. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a></li>
  1369. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a></li>
  1370. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_header">header()</a></li>
  1371. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_module">module()</a></li>
  1372. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_path">path()</a></li>
  1373. <li><a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_paths">paths()</a></li>
  1374. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a></li>
  1375. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a></li>
  1376. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a></li>
  1377. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a></li>
  1378. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a></li>
  1379. </ul>
  1380. </li>
  1381. </ul>
  1382. </section>
  1383. </section>
  1384. </div>
  1385. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1386. <section class="phpdocumentor-search-results__dialog">
  1387. <header class="phpdocumentor-search-results__header">
  1388. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1389. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1390. </header>
  1391. <section class="phpdocumentor-search-results__body">
  1392. <ul class="phpdocumentor-search-results__entries"></ul>
  1393. </section>
  1394. </section>
  1395. </section>
  1396. </div>
  1397. <a href="classes/chillerlan-QRCode-Output-QRMarkupSVG.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1398. </main>
  1399. <script>
  1400. cssVars({});
  1401. </script>
  1402. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1403. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1404. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1405. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1406. </body>
  1407. </html>