chillerlan-QRCode-Output-QRMarkup.html 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. <li class="phpdocumentor-topnav__menu-item -menu">
  44. <a href="https://php-qrcode.readthedocs.io">
  45. <span>
  46. User Manual
  47. </span>
  48. </a>
  49. </li>
  50. <li class="phpdocumentor-topnav__menu-item -social">
  51. <a href="https://github.com/chillerlan/php-qrcode">
  52. <span>
  53. <i class="fab fa-github"></i>
  54. </span>
  55. </a>
  56. </li>
  57. </ul>
  58. </nav>
  59. </header>
  60. <main class="phpdocumentor">
  61. <div class="phpdocumentor-section">
  62. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  63. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  64. Menu
  65. </label>
  66. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  71. </h4>
  72. <ul class="phpdocumentor-list">
  73. <li>
  74. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  75. </li>
  76. <li>
  77. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  78. </li>
  79. </ul>
  80. </section>
  81. <section class="phpdocumentor-sidebar__category">
  82. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  83. <h4 class="phpdocumentor-sidebar__root-namespace">
  84. <a href="packages/Application.html" class="">Application</a>
  85. </h4>
  86. </section>
  87. <section class="phpdocumentor-sidebar__category">
  88. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  89. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  92. </section>
  93. <section class="phpdocumentor-sidebar__category">
  94. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  96. </section>
  97. </aside>
  98. <div class="phpdocumentor-column -eight phpdocumentor-content">
  99. <ul class="phpdocumentor-breadcrumbs">
  100. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  101. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-output.html">Output</a></li>
  103. </ul>
  104. <article class="phpdocumentor-element -class">
  105. <h2 class="phpdocumentor-content__title">
  106. QRMarkup
  107. <span class="phpdocumentor-element__extends">
  108. extends <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"><abbr title="\chillerlan\QRCode\Output\QROutputAbstract">QROutputAbstract</abbr></a>
  109. </span>
  110. <div class="phpdocumentor-element__package">
  111. in package
  112. <ul class="phpdocumentor-breadcrumbs">
  113. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  114. </ul>
  115. </div>
  116. </h2>
  117. <aside class="phpdocumentor-element-found-in">
  118. <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>
  119. :
  120. <span class="phpdocumentor-element-found-in__line">18</span>
  121. </aside>
  122. <p class="phpdocumentor-summary">Abstract for markup types: HTML, SVG, ... XML anyone?</p>
  123. <h3 id="toc">
  124. Table of Contents
  125. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  126. </h3>
  127. <dl class="phpdocumentor-table-of-contents">
  128. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  129. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length</a>
  130. <span>
  131. &nbsp;: int </span>
  132. </dt>
  133. <dd>the side length of the QR image (modules * scale)</dd>
  134. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  135. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix</a>
  136. <span>
  137. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  138. </dt>
  139. <dd>the (filled) data matrix object</dd>
  140. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  141. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount</a>
  142. <span>
  143. &nbsp;: int </span>
  144. </dt>
  145. <dd>the current size of the QR matrix</dd>
  146. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  147. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues</a>
  148. <span>
  149. &nbsp;: array&lt;string|int, mixed&gt; </span>
  150. </dt>
  151. <dd>an (optional) array of color values for the several QR matrix parts</dd>
  152. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  153. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options</a>
  154. <span>
  155. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  156. </dt>
  157. <dd></dd>
  158. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  159. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale</a>
  160. <span>
  161. &nbsp;: int </span>
  162. </dt>
  163. <dd>the current scaling for a QR pixel</dd>
  164. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  165. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a>
  166. <span>
  167. &nbsp;: mixed </span>
  168. </dt>
  169. <dd>QROutputAbstract constructor.</dd>
  170. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  171. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_dump">dump()</a>
  172. <span>
  173. &nbsp;: string </span>
  174. </dt>
  175. <dd></dd>
  176. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  177. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_moduleValueIsValid">moduleValueIsValid()</a>
  178. <span>
  179. &nbsp;: bool </span>
  180. </dt>
  181. <dd>note: we&#039;re not necessarily validating the several values, just checking the general syntax
  182. note: css4 colors are not included</dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  184. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a>
  185. <span>
  186. &nbsp;: array&lt;string|int, mixed&gt; </span>
  187. </dt>
  188. <dd>collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  189. returns an array with the transformed modules</dd>
  190. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  191. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_createMarkup">createMarkup()</a>
  192. <span>
  193. &nbsp;: string </span>
  194. </dt>
  195. <dd>returns the fully parsed and rendered markup string for the given input</dd>
  196. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  197. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_getCssClass">getCssClass()</a>
  198. <span>
  199. &nbsp;: string </span>
  200. </dt>
  201. <dd>returns a string with all css classes for the current element</dd>
  202. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  203. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_getDefaultModuleValue">getDefaultModuleValue()</a>
  204. <span>
  205. &nbsp;: mixed|null </span>
  206. </dt>
  207. <dd>Returns a default value for either dark or light modules</dd>
  208. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  209. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a>
  210. <span>
  211. &nbsp;: mixed|null </span>
  212. </dt>
  213. <dd>Returns the prepared value for the given $M_TYPE</dd>
  214. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  215. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a>
  216. <span>
  217. &nbsp;: mixed|null </span>
  218. </dt>
  219. <dd>Returns the prepared module value at the given coordinate [$x, $y] (convenience)</dd>
  220. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  221. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_prepareModuleValue">prepareModuleValue()</a>
  222. <span>
  223. &nbsp;: mixed|null </span>
  224. </dt>
  225. <dd>Prepares the value for the given input ()</dd>
  226. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  227. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  228. <span>
  229. &nbsp;: void </span>
  230. </dt>
  231. <dd>Saves the qr $data to a $file. If $file is null, nothing happens.</dd>
  232. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  233. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a>
  234. <span>
  235. &nbsp;: void </span>
  236. </dt>
  237. <dd>Sets/updates the matrix dimensions</dd>
  238. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  239. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  240. <span>
  241. &nbsp;: void </span>
  242. </dt>
  243. <dd>Sets the initial module values</dd>
  244. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  245. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a>
  246. <span>
  247. &nbsp;: string </span>
  248. </dt>
  249. <dd>Returns a base64 data URI for the given string and mime type</dd>
  250. </dl>
  251. <section class="phpdocumentor-properties">
  252. <h3 class="phpdocumentor-elements__header" id="properties">
  253. Properties
  254. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  255. </h3>
  256. <article
  257. class="
  258. phpdocumentor-element
  259. -property
  260. -protected
  261. "
  262. >
  263. <h4 class="phpdocumentor-element__name" id="property_length">
  264. $length
  265. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  266. <span class="phpdocumentor-element__modifiers">
  267. </span>
  268. </h4>
  269. <aside class="phpdocumentor-element-found-in">
  270. <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>
  271. :
  272. <span class="phpdocumentor-element-found-in__line">40</span>
  273. </aside>
  274. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  275. <code class="phpdocumentor-code phpdocumentor-signature ">
  276. <span class="phpdocumentor-signature__visibility">protected</span>
  277. <span class="phpdocumentor-signature__type">int</span>
  278. <span class="phpdocumentor-signature__name">$length</span>
  279. </code>
  280. <section class="phpdocumentor-description"></section>
  281. </article>
  282. <article
  283. class="
  284. phpdocumentor-element
  285. -property
  286. -protected
  287. "
  288. >
  289. <h4 class="phpdocumentor-element__name" id="property_matrix">
  290. $matrix
  291. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  292. <span class="phpdocumentor-element__modifiers">
  293. </span>
  294. </h4>
  295. <aside class="phpdocumentor-element-found-in">
  296. <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>
  297. :
  298. <span class="phpdocumentor-element-found-in__line">50</span>
  299. </aside>
  300. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  301. <code class="phpdocumentor-code phpdocumentor-signature ">
  302. <span class="phpdocumentor-signature__visibility">protected</span>
  303. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  304. <span class="phpdocumentor-signature__name">$matrix</span>
  305. </code>
  306. <section class="phpdocumentor-description"></section>
  307. </article>
  308. <article
  309. class="
  310. phpdocumentor-element
  311. -property
  312. -protected
  313. "
  314. >
  315. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  316. $moduleCount
  317. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" class="headerlink"><i class="fas fa-link"></i></a>
  318. <span class="phpdocumentor-element__modifiers">
  319. </span>
  320. </h4>
  321. <aside class="phpdocumentor-element-found-in">
  322. <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>
  323. :
  324. <span class="phpdocumentor-element-found-in__line">28</span>
  325. </aside>
  326. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  327. <code class="phpdocumentor-code phpdocumentor-signature ">
  328. <span class="phpdocumentor-signature__visibility">protected</span>
  329. <span class="phpdocumentor-signature__type">int</span>
  330. <span class="phpdocumentor-signature__name">$moduleCount</span>
  331. </code>
  332. <section class="phpdocumentor-description"></section>
  333. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  334. Tags
  335. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  336. </h5>
  337. <dl class="phpdocumentor-tag-list">
  338. <dt class="phpdocumentor-tag-list__entry">
  339. <span class="phpdocumentor-tag__name">see</span>
  340. </dt>
  341. <dd class="phpdocumentor-tag-list__definition">
  342. <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>
  343. </dd>
  344. </dl>
  345. </article>
  346. <article
  347. class="
  348. phpdocumentor-element
  349. -property
  350. -protected
  351. "
  352. >
  353. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  354. $moduleValues
  355. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  356. <span class="phpdocumentor-element__modifiers">
  357. </span>
  358. </h4>
  359. <aside class="phpdocumentor-element-found-in">
  360. <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>
  361. :
  362. <span class="phpdocumentor-element-found-in__line">45</span>
  363. </aside>
  364. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  365. <code class="phpdocumentor-code phpdocumentor-signature ">
  366. <span class="phpdocumentor-signature__visibility">protected</span>
  367. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  368. <span class="phpdocumentor-signature__name">$moduleValues</span>
  369. </code>
  370. <section class="phpdocumentor-description"></section>
  371. </article>
  372. <article
  373. class="
  374. phpdocumentor-element
  375. -property
  376. -protected
  377. "
  378. >
  379. <h4 class="phpdocumentor-element__name" id="property_options">
  380. $options
  381. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" 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">55</span>
  389. </aside>
  390. <code class="phpdocumentor-code phpdocumentor-signature ">
  391. <span class="phpdocumentor-signature__visibility">protected</span>
  392. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  393. <span class="phpdocumentor-signature__name">$options</span>
  394. </code>
  395. </article>
  396. <article
  397. class="
  398. phpdocumentor-element
  399. -property
  400. -protected
  401. "
  402. >
  403. <h4 class="phpdocumentor-element__name" id="property_scale">
  404. $scale
  405. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  406. <span class="phpdocumentor-element__modifiers">
  407. </span>
  408. </h4>
  409. <aside class="phpdocumentor-element-found-in">
  410. <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>
  411. :
  412. <span class="phpdocumentor-element-found-in__line">35</span>
  413. </aside>
  414. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  415. <code class="phpdocumentor-code phpdocumentor-signature ">
  416. <span class="phpdocumentor-signature__visibility">protected</span>
  417. <span class="phpdocumentor-signature__type">int</span>
  418. <span class="phpdocumentor-signature__name">$scale</span>
  419. </code>
  420. <section class="phpdocumentor-description"></section>
  421. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  422. Tags
  423. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  424. </h5>
  425. <dl class="phpdocumentor-tag-list">
  426. <dt class="phpdocumentor-tag-list__entry">
  427. <span class="phpdocumentor-tag__name">see</span>
  428. </dt>
  429. <dd class="phpdocumentor-tag-list__definition">
  430. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  431. </dd>
  432. </dl>
  433. </article>
  434. </section>
  435. <section class="phpdocumentor-methods">
  436. <h3 class="phpdocumentor-elements__header" id="methods">
  437. Methods
  438. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  439. </h3>
  440. <article
  441. class="phpdocumentor-element
  442. -method
  443. -public
  444. "
  445. >
  446. <h4 class="phpdocumentor-element__name" id="method___construct">
  447. __construct()
  448. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  449. </h4>
  450. <aside class="phpdocumentor-element-found-in">
  451. <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>
  452. :
  453. <span class="phpdocumentor-element-found-in__line">60</span>
  454. </aside>
  455. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  456. <code class="phpdocumentor-code phpdocumentor-signature ">
  457. <span class="phpdocumentor-signature__visibility">public</span>
  458. <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>
  459. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  460. <dl class="phpdocumentor-argument-list">
  461. <dt class="phpdocumentor-argument-list__entry">
  462. <span class="phpdocumentor-signature__argument__name">$options</span>
  463. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  464. </dt>
  465. <dd class="phpdocumentor-argument-list__definition">
  466. <section class="phpdocumentor-description"></section>
  467. </dd>
  468. <dt class="phpdocumentor-argument-list__entry">
  469. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  470. : <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>
  471. </dt>
  472. <dd class="phpdocumentor-argument-list__definition">
  473. <section class="phpdocumentor-description"></section>
  474. </dd>
  475. </dl>
  476. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  477. <span class="phpdocumentor-signature__response_type">mixed</span>
  478. &mdash;
  479. </article>
  480. <article
  481. class="phpdocumentor-element
  482. -method
  483. -public
  484. "
  485. >
  486. <h4 class="phpdocumentor-element__name" id="method_dump">
  487. dump()
  488. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_dump" class="headerlink"><i class="fas fa-link"></i></a>
  489. </h4>
  490. <aside class="phpdocumentor-element-found-in">
  491. <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>
  492. :
  493. <span class="phpdocumentor-element-found-in__line">74</span>
  494. </aside>
  495. <code class="phpdocumentor-code phpdocumentor-signature ">
  496. <span class="phpdocumentor-signature__visibility">public</span>
  497. <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>
  498. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  499. <dl class="phpdocumentor-argument-list">
  500. <dt class="phpdocumentor-argument-list__entry">
  501. <span class="phpdocumentor-signature__argument__name">$file</span>
  502. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  503. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  504. <dd class="phpdocumentor-argument-list__definition">
  505. <section class="phpdocumentor-description"></section>
  506. </dd>
  507. </dl>
  508. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  509. Tags
  510. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  511. </h5>
  512. <dl class="phpdocumentor-tag-list">
  513. <dt class="phpdocumentor-tag-list__entry">
  514. <span class="phpdocumentor-tag__name">inheritDoc</span>
  515. </dt>
  516. <dd class="phpdocumentor-tag-list__definition">
  517. </dd>
  518. </dl>
  519. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  520. <span class="phpdocumentor-signature__response_type">string</span>
  521. &mdash;
  522. </article>
  523. <article
  524. class="phpdocumentor-element
  525. -method
  526. -public
  527. -static "
  528. >
  529. <h4 class="phpdocumentor-element__name" id="method_moduleValueIsValid">
  530. moduleValueIsValid()
  531. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_moduleValueIsValid" class="headerlink"><i class="fas fa-link"></i></a>
  532. </h4>
  533. <aside class="phpdocumentor-element-found-in">
  534. <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>
  535. :
  536. <span class="phpdocumentor-element-found-in__line">29</span>
  537. </aside>
  538. <p class="phpdocumentor-summary">note: we&#039;re not necessarily validating the several values, just checking the general syntax
  539. note: css4 colors are not included</p>
  540. <code class="phpdocumentor-code phpdocumentor-signature ">
  541. <span class="phpdocumentor-signature__visibility">public</span>
  542. <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>
  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">$value</span>
  547. : <span class="phpdocumentor-signature__argument__return-type">mixed</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">todo:</span>
  560. </dt>
  561. <dd class="phpdocumentor-tag-list__definition">
  562. <section class="phpdocumentor-description"><p>XSS proof</p>
  563. </section>
  564. </dd>
  565. <dt class="phpdocumentor-tag-list__entry">
  566. <span class="phpdocumentor-tag__name">see</span>
  567. </dt>
  568. <dd class="phpdocumentor-tag-list__definition">
  569. <span class="phpdocumentor-tag-link"><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value"><abbr title="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">https://developer.mozilla.org/en-US/docs/Web/CSS/color_value</abbr></a></span>
  570. </dd>
  571. <dt class="phpdocumentor-tag-list__entry">
  572. <span class="phpdocumentor-tag__name">inheritDoc</span>
  573. </dt>
  574. <dd class="phpdocumentor-tag-list__definition">
  575. </dd>
  576. </dl>
  577. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  578. <span class="phpdocumentor-signature__response_type">bool</span>
  579. &mdash;
  580. </article>
  581. <article
  582. class="phpdocumentor-element
  583. -method
  584. -protected
  585. "
  586. >
  587. <h4 class="phpdocumentor-element__name" id="method_collectModules">
  588. collectModules()
  589. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules" class="headerlink"><i class="fas fa-link"></i></a>
  590. </h4>
  591. <aside class="phpdocumentor-element-found-in">
  592. <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>
  593. :
  594. <span class="phpdocumentor-element-found-in__line">176</span>
  595. </aside>
  596. <p class="phpdocumentor-summary">collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  597. returns an array with the transformed modules</p>
  598. <code class="phpdocumentor-code phpdocumentor-signature ">
  599. <span class="phpdocumentor-signature__visibility">protected</span>
  600. <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>
  601. <section class="phpdocumentor-description"><p>The transform callback is called with the following parameters:</p>
  602. <p>$x - current column
  603. $y - current row
  604. $M_TYPE - field value
  605. $M_TYPE_LAYER - (possibly modified) field value that acts as layer id</p>
  606. </section>
  607. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  608. <dl class="phpdocumentor-argument-list">
  609. <dt class="phpdocumentor-argument-list__entry">
  610. <span class="phpdocumentor-signature__argument__name">$transform</span>
  611. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  612. </dt>
  613. <dd class="phpdocumentor-argument-list__definition">
  614. <section class="phpdocumentor-description"></section>
  615. </dd>
  616. </dl>
  617. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  618. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  619. &mdash;
  620. </article>
  621. <article
  622. class="phpdocumentor-element
  623. -method
  624. -protected
  625. -abstract "
  626. >
  627. <h4 class="phpdocumentor-element__name" id="method_createMarkup">
  628. createMarkup()
  629. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_createMarkup" class="headerlink"><i class="fas fa-link"></i></a>
  630. </h4>
  631. <aside class="phpdocumentor-element-found-in">
  632. <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>
  633. :
  634. <span class="phpdocumentor-element-found-in__line">92</span>
  635. </aside>
  636. <p class="phpdocumentor-summary">returns the fully parsed and rendered markup string for the given input</p>
  637. <code class="phpdocumentor-code phpdocumentor-signature ">
  638. <span class="phpdocumentor-signature__visibility">protected</span>
  639. <span class="phpdocumentor-signature__abstract">abstract</span> <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>
  640. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  641. <dl class="phpdocumentor-argument-list">
  642. <dt class="phpdocumentor-argument-list__entry">
  643. <span class="phpdocumentor-signature__argument__name">$saveToFile</span>
  644. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  645. </dt>
  646. <dd class="phpdocumentor-argument-list__definition">
  647. <section class="phpdocumentor-description"></section>
  648. </dd>
  649. </dl>
  650. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  651. <span class="phpdocumentor-signature__response_type">string</span>
  652. &mdash;
  653. </article>
  654. <article
  655. class="phpdocumentor-element
  656. -method
  657. -protected
  658. "
  659. >
  660. <h4 class="phpdocumentor-element__name" id="method_getCssClass">
  661. getCssClass()
  662. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_getCssClass" class="headerlink"><i class="fas fa-link"></i></a>
  663. </h4>
  664. <aside class="phpdocumentor-element-found-in">
  665. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QRMarkup.php"><a href="files/src-output-qrmarkup.html"><abbr title="src/Output/QRMarkup.php">QRMarkup.php</abbr></a></abbr>
  666. :
  667. <span class="phpdocumentor-element-found-in__line">85</span>
  668. </aside>
  669. <p class="phpdocumentor-summary">returns a string with all css classes for the current element</p>
  670. <code class="phpdocumentor-code phpdocumentor-signature ">
  671. <span class="phpdocumentor-signature__visibility">protected</span>
  672. <span class="phpdocumentor-signature__name">getCssClass</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">string</span></code>
  673. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  674. <dl class="phpdocumentor-argument-list">
  675. <dt class="phpdocumentor-argument-list__entry">
  676. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  677. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  678. </dt>
  679. <dd class="phpdocumentor-argument-list__definition">
  680. <section class="phpdocumentor-description"></section>
  681. </dd>
  682. </dl>
  683. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  684. <span class="phpdocumentor-signature__response_type">string</span>
  685. &mdash;
  686. </article>
  687. <article
  688. class="phpdocumentor-element
  689. -method
  690. -protected
  691. "
  692. >
  693. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  694. getDefaultModuleValue()
  695. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  696. </h4>
  697. <aside class="phpdocumentor-element-found-in">
  698. <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>
  699. :
  700. <span class="phpdocumentor-element-found-in__line">67</span>
  701. </aside>
  702. <p class="phpdocumentor-summary">Returns a default value for either dark or light modules</p>
  703. <code class="phpdocumentor-code phpdocumentor-signature ">
  704. <span class="phpdocumentor-signature__visibility">protected</span>
  705. <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>
  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">$isDark</span>
  710. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  711. </dt>
  712. <dd class="phpdocumentor-argument-list__definition">
  713. <section class="phpdocumentor-description"></section>
  714. </dd>
  715. </dl>
  716. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  717. Tags
  718. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  719. </h5>
  720. <dl class="phpdocumentor-tag-list">
  721. <dt class="phpdocumentor-tag-list__entry">
  722. <span class="phpdocumentor-tag__name">inheritDoc</span>
  723. </dt>
  724. <dd class="phpdocumentor-tag-list__definition">
  725. </dd>
  726. </dl>
  727. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  728. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  729. &mdash;
  730. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  731. </section>
  732. </article>
  733. <article
  734. class="phpdocumentor-element
  735. -method
  736. -protected
  737. "
  738. >
  739. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  740. getModuleValue()
  741. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  742. </h4>
  743. <aside class="phpdocumentor-element-found-in">
  744. <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>
  745. :
  746. <span class="phpdocumentor-element-found-in__line">100</span>
  747. </aside>
  748. <p class="phpdocumentor-summary">Returns the prepared value for the given $M_TYPE</p>
  749. <code class="phpdocumentor-code phpdocumentor-signature ">
  750. <span class="phpdocumentor-signature__visibility">protected</span>
  751. <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>
  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. </dt>
  758. <dd class="phpdocumentor-argument-list__definition">
  759. <section class="phpdocumentor-description"></section>
  760. </dd>
  761. </dl>
  762. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  763. Tags
  764. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  765. </h5>
  766. <dl class="phpdocumentor-tag-list">
  767. <dt class="phpdocumentor-tag-list__entry">
  768. <span class="phpdocumentor-tag__name">throws</span>
  769. </dt>
  770. <dd class="phpdocumentor-tag-list__definition">
  771. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  772. </dd>
  773. </dl>
  774. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  775. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  776. &mdash;
  777. <section class="phpdocumentor-description"><p>return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist</p>
  778. </section>
  779. </article>
  780. <article
  781. class="phpdocumentor-element
  782. -method
  783. -protected
  784. "
  785. >
  786. <h4 class="phpdocumentor-element__name" id="method_getModuleValueAt">
  787. getModuleValueAt()
  788. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt" class="headerlink"><i class="fas fa-link"></i></a>
  789. </h4>
  790. <aside class="phpdocumentor-element-found-in">
  791. <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>
  792. :
  793. <span class="phpdocumentor-element-found-in__line">115</span>
  794. </aside>
  795. <p class="phpdocumentor-summary">Returns the prepared module value at the given coordinate [$x, $y] (convenience)</p>
  796. <code class="phpdocumentor-code phpdocumentor-signature ">
  797. <span class="phpdocumentor-signature__visibility">protected</span>
  798. <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>
  799. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  800. <dl class="phpdocumentor-argument-list">
  801. <dt class="phpdocumentor-argument-list__entry">
  802. <span class="phpdocumentor-signature__argument__name">$x</span>
  803. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  804. </dt>
  805. <dd class="phpdocumentor-argument-list__definition">
  806. <section class="phpdocumentor-description"></section>
  807. </dd>
  808. <dt class="phpdocumentor-argument-list__entry">
  809. <span class="phpdocumentor-signature__argument__name">$y</span>
  810. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  811. </dt>
  812. <dd class="phpdocumentor-argument-list__definition">
  813. <section class="phpdocumentor-description"></section>
  814. </dd>
  815. </dl>
  816. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  817. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  818. &mdash;
  819. </article>
  820. <article
  821. class="phpdocumentor-element
  822. -method
  823. -protected
  824. "
  825. >
  826. <h4 class="phpdocumentor-element__name" id="method_prepareModuleValue">
  827. prepareModuleValue()
  828. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#method_prepareModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  829. </h4>
  830. <aside class="phpdocumentor-element-found-in">
  831. <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>
  832. :
  833. <span class="phpdocumentor-element-found-in__line">60</span>
  834. </aside>
  835. <p class="phpdocumentor-summary">Prepares the value for the given input ()</p>
  836. <code class="phpdocumentor-code phpdocumentor-signature ">
  837. <span class="phpdocumentor-signature__visibility">protected</span>
  838. <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>
  839. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  840. <dl class="phpdocumentor-argument-list">
  841. <dt class="phpdocumentor-argument-list__entry">
  842. <span class="phpdocumentor-signature__argument__name">$value</span>
  843. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  844. </dt>
  845. <dd class="phpdocumentor-argument-list__definition">
  846. </dd>
  847. </dl>
  848. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  849. Tags
  850. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  851. </h5>
  852. <dl class="phpdocumentor-tag-list">
  853. <dt class="phpdocumentor-tag-list__entry">
  854. <span class="phpdocumentor-tag__name">inheritDoc</span>
  855. </dt>
  856. <dd class="phpdocumentor-tag-list__definition">
  857. </dd>
  858. </dl>
  859. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  860. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  861. &mdash;
  862. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  863. </section>
  864. </article>
  865. <article
  866. class="phpdocumentor-element
  867. -method
  868. -protected
  869. "
  870. >
  871. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  872. saveToFile()
  873. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" 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">150</span>
  879. </aside>
  880. <p class="phpdocumentor-summary">Saves the qr $data to a $file. If $file is null, nothing happens.</p>
  881. <code class="phpdocumentor-code phpdocumentor-signature ">
  882. <span class="phpdocumentor-signature__visibility">protected</span>
  883. <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>
  884. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  885. <dl class="phpdocumentor-argument-list">
  886. <dt class="phpdocumentor-argument-list__entry">
  887. <span class="phpdocumentor-signature__argument__name">$data</span>
  888. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  889. </dt>
  890. <dd class="phpdocumentor-argument-list__definition">
  891. <section class="phpdocumentor-description"></section>
  892. </dd>
  893. <dt class="phpdocumentor-argument-list__entry">
  894. <span class="phpdocumentor-signature__argument__name">$file</span>
  895. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  896. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  897. <dd class="phpdocumentor-argument-list__definition">
  898. <section class="phpdocumentor-description"></section>
  899. </dd>
  900. </dl>
  901. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  902. Tags
  903. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  904. </h5>
  905. <dl class="phpdocumentor-tag-list">
  906. <dt class="phpdocumentor-tag-list__entry">
  907. <span class="phpdocumentor-tag__name">see</span>
  908. </dt>
  909. <dd class="phpdocumentor-tag-list__definition">
  910. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  911. </dd>
  912. <dt class="phpdocumentor-tag-list__entry">
  913. <span class="phpdocumentor-tag__name">see</span>
  914. </dt>
  915. <dd class="phpdocumentor-tag-list__definition">
  916. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$cachefile">QROptions::$cachefile</abbr></span>
  917. </dd>
  918. <dt class="phpdocumentor-tag-list__entry">
  919. <span class="phpdocumentor-tag__name">throws</span>
  920. </dt>
  921. <dd class="phpdocumentor-tag-list__definition">
  922. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  923. </dd>
  924. </dl>
  925. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  926. <span class="phpdocumentor-signature__response_type">void</span>
  927. &mdash;
  928. </article>
  929. <article
  930. class="phpdocumentor-element
  931. -method
  932. -protected
  933. "
  934. >
  935. <h4 class="phpdocumentor-element__name" id="method_setMatrixDimensions">
  936. setMatrixDimensions()
  937. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  938. </h4>
  939. <aside class="phpdocumentor-element-found-in">
  940. <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>
  941. :
  942. <span class="phpdocumentor-element-found-in__line">73</span>
  943. </aside>
  944. <p class="phpdocumentor-summary">Sets/updates the matrix dimensions</p>
  945. <code class="phpdocumentor-code phpdocumentor-signature ">
  946. <span class="phpdocumentor-signature__visibility">protected</span>
  947. <span class="phpdocumentor-signature__name">setMatrixDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  948. <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>
  949. </section>
  950. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  951. <span class="phpdocumentor-signature__response_type">void</span>
  952. &mdash;
  953. </article>
  954. <article
  955. class="phpdocumentor-element
  956. -method
  957. -protected
  958. "
  959. >
  960. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  961. setModuleValues()
  962. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  963. </h4>
  964. <aside class="phpdocumentor-element-found-in">
  965. <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>
  966. :
  967. <span class="phpdocumentor-element-found-in__line">82</span>
  968. </aside>
  969. <p class="phpdocumentor-summary">Sets the initial module values</p>
  970. <code class="phpdocumentor-code phpdocumentor-signature ">
  971. <span class="phpdocumentor-signature__visibility">protected</span>
  972. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  973. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  974. <span class="phpdocumentor-signature__response_type">void</span>
  975. &mdash;
  976. </article>
  977. <article
  978. class="phpdocumentor-element
  979. -method
  980. -protected
  981. "
  982. >
  983. <h4 class="phpdocumentor-element__name" id="method_toBase64DataURI">
  984. toBase64DataURI()
  985. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI" class="headerlink"><i class="fas fa-link"></i></a>
  986. </h4>
  987. <aside class="phpdocumentor-element-found-in">
  988. <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>
  989. :
  990. <span class="phpdocumentor-element-found-in__line">138</span>
  991. </aside>
  992. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  993. <code class="phpdocumentor-code phpdocumentor-signature ">
  994. <span class="phpdocumentor-signature__visibility">protected</span>
  995. <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>
  996. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  997. <dl class="phpdocumentor-argument-list">
  998. <dt class="phpdocumentor-argument-list__entry">
  999. <span class="phpdocumentor-signature__argument__name">$data</span>
  1000. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1001. </dt>
  1002. <dd class="phpdocumentor-argument-list__definition">
  1003. <section class="phpdocumentor-description"></section>
  1004. </dd>
  1005. <dt class="phpdocumentor-argument-list__entry">
  1006. <span class="phpdocumentor-signature__argument__name">$mime</span>
  1007. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1008. </dt>
  1009. <dd class="phpdocumentor-argument-list__definition">
  1010. <section class="phpdocumentor-description"></section>
  1011. </dd>
  1012. </dl>
  1013. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1014. <span class="phpdocumentor-signature__response_type">string</span>
  1015. &mdash;
  1016. </article>
  1017. </section>
  1018. <script type="text/javascript">
  1019. function loadExternalCodeSnippets(line) {
  1020. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1021. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  1022. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  1023. var language = 'php';
  1024. var code = document.createElement('code');
  1025. code.className = 'language-' + language;
  1026. pre.textContent = '';
  1027. pre.setAttribute('data-line', line)
  1028. code.textContent = 'Loading…';
  1029. pre.appendChild(code);
  1030. var xhr = new XMLHttpRequest();
  1031. xhr.open('GET', src, true);
  1032. xhr.onreadystatechange = function () {
  1033. if (xhr.readyState == 4) {
  1034. if (xhr.status < 400 && xhr.responseText) {
  1035. code.textContent = xhr.responseText;
  1036. Prism.highlightElement(code);
  1037. }
  1038. else if (xhr.status >= 400) {
  1039. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1040. }
  1041. else {
  1042. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  1043. }
  1044. }
  1045. };
  1046. xhr.send(null);
  1047. });
  1048. }
  1049. var modals = document.querySelectorAll("[data-modal]");
  1050. modals.forEach(function (trigger) {
  1051. trigger.addEventListener("click", function (event) {
  1052. //event.preventDefault();
  1053. const modal = document.getElementById(trigger.dataset.modal);
  1054. modal.classList.add("phpdocumentor-modal__open");
  1055. loadExternalCodeSnippets(trigger.dataset.line)
  1056. const exits = modal.querySelectorAll("[data-exit-button]");
  1057. exits.forEach(function (exit) {
  1058. exit.addEventListener("click", function (event) {
  1059. event.preventDefault();
  1060. modal.classList.remove("phpdocumentor-modal__open");
  1061. });
  1062. });
  1063. });
  1064. });
  1065. </script>
  1066. </article>
  1067. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1068. <section class="phpdocumentor-search-results__dialog">
  1069. <header class="phpdocumentor-search-results__header">
  1070. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1071. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1072. </header>
  1073. <section class="phpdocumentor-search-results__body">
  1074. <ul class="phpdocumentor-search-results__entries"></ul>
  1075. </section>
  1076. </section>
  1077. </section>
  1078. </div>
  1079. </div>
  1080. <a href="classes/chillerlan-QRCode-Output-QRMarkup.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1081. </main>
  1082. <script>
  1083. cssVars({});
  1084. </script>
  1085. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1086. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1087. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1088. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1089. </body>
  1090. </html>