chillerlan-QRCode-Output-QRMarkupHTML.html 60 KB

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