chillerlan-QRCode-Output-QRString.html 51 KB

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