chillerlan-QRCode-Output-QRString.html 64 KB

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