chillerlan-QRCode-Output-QRMarkup.html 66 KB

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