chillerlan-QRCode-Output-QROutputAbstract.html 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  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"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-output.html">Output</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. QROutputAbstract
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. <span class="phpdocumentor-element__implements">
  96. implements
  97. <a href="classes/chillerlan-QRCode-Output-QROutputInterface.html"><abbr title="\chillerlan\QRCode\Output\QROutputInterface">QROutputInterface</abbr></a> </span>
  98. </h2>
  99. <aside class="phpdocumentor-element-found-in">
  100. <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>
  101. :
  102. <span class="phpdocumentor-element-found-in__line">20</span>
  103. </aside>
  104. <p class="phpdocumentor-summary">common output abstract</p>
  105. <h3 id="interfaces_class_traits">
  106. Interfaces, Classes and Traits
  107. <a href="#interfaces_class_traits" class="headerlink"><i class="fas fa-link"></i></a>
  108. </h3>
  109. <dl class="phpdocumentor-table-of-contents">
  110. <dt class="phpdocumentor-table-of-contents__entry -interface"><a href="classes/chillerlan-QRCode-Output-QROutputInterface.html"><abbr title="\chillerlan\QRCode\Output\QROutputInterface">QROutputInterface</abbr></a></dt>
  111. <dd>Converts the data matrix into readable output</dd>
  112. </dl>
  113. <h3 id="toc">
  114. Table of Contents
  115. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  116. </h3>
  117. <dl class="phpdocumentor-table-of-contents">
  118. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  119. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length</a>
  120. <span>
  121. &nbsp;: int </span>
  122. </dt>
  123. <dd>the side length of the QR image (modules * scale)</dd>
  124. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  125. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix</a>
  126. <span>
  127. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  128. </dt>
  129. <dd>the (filled) data matrix object</dd>
  130. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  131. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount</a>
  132. <span>
  133. &nbsp;: int </span>
  134. </dt>
  135. <dd>the current size of the QR matrix</dd>
  136. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  137. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues</a>
  138. <span>
  139. &nbsp;: array&lt;string|int, mixed&gt; </span>
  140. </dt>
  141. <dd>an (optional) array of color values for the several QR matrix parts</dd>
  142. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  143. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options</a>
  144. <span>
  145. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  146. </dt>
  147. <dd></dd>
  148. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  149. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale</a>
  150. <span>
  151. &nbsp;: int </span>
  152. </dt>
  153. <dd>the current scaling for a QR pixel</dd>
  154. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  155. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a>
  156. <span>
  157. &nbsp;: mixed </span>
  158. </dt>
  159. <dd>QROutputAbstract constructor.</dd>
  160. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  161. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_base64encode">base64encode()</a>
  162. <span>
  163. &nbsp;: string </span>
  164. </dt>
  165. <dd>Returns a base64 data URI for the given string and mime type</dd>
  166. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  167. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a>
  168. <span>
  169. &nbsp;: mixed </span>
  170. </dt>
  171. <dd>Returns a defualt value for either dark or light modules (return value depends on the output module)</dd>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  173. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a>
  174. <span>
  175. &nbsp;: mixed </span>
  176. </dt>
  177. <dd>Returns the final value for the given input (return value depends on the output module)</dd>
  178. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  179. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_moduleValueIsValid">moduleValueIsValid()</a>
  180. <span>
  181. &nbsp;: bool </span>
  182. </dt>
  183. <dd>Determines whether the given value is valid</dd>
  184. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  185. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  186. <span>
  187. &nbsp;: void </span>
  188. </dt>
  189. <dd>saves the qr data to a file</dd>
  190. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  191. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  192. <span>
  193. &nbsp;: void </span>
  194. </dt>
  195. <dd>Sets the initial module values</dd>
  196. </dl>
  197. <section class="phpdocumentor-properties">
  198. <h3 class="phpdocumentor-elements__header" id="properties">
  199. Properties
  200. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  201. </h3>
  202. <article
  203. class="
  204. phpdocumentor-element
  205. -property
  206. -protected
  207. "
  208. >
  209. <h4 class="phpdocumentor-element__name" id="property_length">
  210. $length
  211. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  212. <span class="phpdocumentor-element__modifiers">
  213. </span>
  214. </h4>
  215. <aside class="phpdocumentor-element-found-in">
  216. <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>
  217. :
  218. <span class="phpdocumentor-element-found-in__line">39</span>
  219. </aside>
  220. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  221. <code class="phpdocumentor-code phpdocumentor-signature ">
  222. <span class="phpdocumentor-signature__visibility">protected</span>
  223. <span class="phpdocumentor-signature__type">int</span>
  224. <span class="phpdocumentor-signature__name">$length</span>
  225. </code>
  226. <section class="phpdocumentor-description"></section>
  227. </article>
  228. <article
  229. class="
  230. phpdocumentor-element
  231. -property
  232. -protected
  233. "
  234. >
  235. <h4 class="phpdocumentor-element__name" id="property_matrix">
  236. $matrix
  237. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  238. <span class="phpdocumentor-element__modifiers">
  239. </span>
  240. </h4>
  241. <aside class="phpdocumentor-element-found-in">
  242. <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>
  243. :
  244. <span class="phpdocumentor-element-found-in__line">49</span>
  245. </aside>
  246. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  247. <code class="phpdocumentor-code phpdocumentor-signature ">
  248. <span class="phpdocumentor-signature__visibility">protected</span>
  249. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  250. <span class="phpdocumentor-signature__name">$matrix</span>
  251. </code>
  252. <section class="phpdocumentor-description"></section>
  253. </article>
  254. <article
  255. class="
  256. phpdocumentor-element
  257. -property
  258. -protected
  259. "
  260. >
  261. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  262. $moduleCount
  263. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" class="headerlink"><i class="fas fa-link"></i></a>
  264. <span class="phpdocumentor-element__modifiers">
  265. </span>
  266. </h4>
  267. <aside class="phpdocumentor-element-found-in">
  268. <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>
  269. :
  270. <span class="phpdocumentor-element-found-in__line">27</span>
  271. </aside>
  272. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  273. <code class="phpdocumentor-code phpdocumentor-signature ">
  274. <span class="phpdocumentor-signature__visibility">protected</span>
  275. <span class="phpdocumentor-signature__type">int</span>
  276. <span class="phpdocumentor-signature__name">$moduleCount</span>
  277. </code>
  278. <section class="phpdocumentor-description"></section>
  279. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  280. Tags
  281. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  282. </h5>
  283. <dl class="phpdocumentor-tag-list">
  284. <dt class="phpdocumentor-tag-list__entry">
  285. <span class="phpdocumentor-tag__name">see</span>
  286. </dt>
  287. <dd class="phpdocumentor-tag-list__definition">
  288. <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>
  289. </dd>
  290. </dl>
  291. </article>
  292. <article
  293. class="
  294. phpdocumentor-element
  295. -property
  296. -protected
  297. "
  298. >
  299. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  300. $moduleValues
  301. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  302. <span class="phpdocumentor-element__modifiers">
  303. </span>
  304. </h4>
  305. <aside class="phpdocumentor-element-found-in">
  306. <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>
  307. :
  308. <span class="phpdocumentor-element-found-in__line">44</span>
  309. </aside>
  310. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  311. <code class="phpdocumentor-code phpdocumentor-signature ">
  312. <span class="phpdocumentor-signature__visibility">protected</span>
  313. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  314. <span class="phpdocumentor-signature__name">$moduleValues</span>
  315. </code>
  316. <section class="phpdocumentor-description"></section>
  317. </article>
  318. <article
  319. class="
  320. phpdocumentor-element
  321. -property
  322. -protected
  323. "
  324. >
  325. <h4 class="phpdocumentor-element__name" id="property_options">
  326. $options
  327. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  328. <span class="phpdocumentor-element__modifiers">
  329. </span>
  330. </h4>
  331. <aside class="phpdocumentor-element-found-in">
  332. <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>
  333. :
  334. <span class="phpdocumentor-element-found-in__line">54</span>
  335. </aside>
  336. <code class="phpdocumentor-code phpdocumentor-signature ">
  337. <span class="phpdocumentor-signature__visibility">protected</span>
  338. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  339. <span class="phpdocumentor-signature__name">$options</span>
  340. </code>
  341. </article>
  342. <article
  343. class="
  344. phpdocumentor-element
  345. -property
  346. -protected
  347. "
  348. >
  349. <h4 class="phpdocumentor-element__name" id="property_scale">
  350. $scale
  351. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  352. <span class="phpdocumentor-element__modifiers">
  353. </span>
  354. </h4>
  355. <aside class="phpdocumentor-element-found-in">
  356. <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>
  357. :
  358. <span class="phpdocumentor-element-found-in__line">34</span>
  359. </aside>
  360. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  361. <code class="phpdocumentor-code phpdocumentor-signature ">
  362. <span class="phpdocumentor-signature__visibility">protected</span>
  363. <span class="phpdocumentor-signature__type">int</span>
  364. <span class="phpdocumentor-signature__name">$scale</span>
  365. </code>
  366. <section class="phpdocumentor-description"></section>
  367. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  368. Tags
  369. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  370. </h5>
  371. <dl class="phpdocumentor-tag-list">
  372. <dt class="phpdocumentor-tag-list__entry">
  373. <span class="phpdocumentor-tag__name">see</span>
  374. </dt>
  375. <dd class="phpdocumentor-tag-list__definition">
  376. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  377. </dd>
  378. </dl>
  379. </article>
  380. </section>
  381. <section class="phpdocumentor-methods">
  382. <h3 class="phpdocumentor-elements__header" id="methods">
  383. Methods
  384. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  385. </h3>
  386. <article
  387. class="phpdocumentor-element
  388. -method
  389. -public
  390. "
  391. >
  392. <h4 class="phpdocumentor-element__name" id="method___construct">
  393. __construct()
  394. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  395. </h4>
  396. <aside class="phpdocumentor-element-found-in">
  397. <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>
  398. :
  399. <span class="phpdocumentor-element-found-in__line">59</span>
  400. </aside>
  401. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  402. <code class="phpdocumentor-code phpdocumentor-signature ">
  403. <span class="phpdocumentor-signature__visibility">public</span>
  404. <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>
  405. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  406. <dl class="phpdocumentor-argument-list">
  407. <dt class="phpdocumentor-argument-list__entry">
  408. <span class="phpdocumentor-signature__argument__name">$options</span>
  409. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  410. </dt>
  411. <dd class="phpdocumentor-argument-list__definition">
  412. <section class="phpdocumentor-description"></section>
  413. </dd>
  414. <dt class="phpdocumentor-argument-list__entry">
  415. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  416. : <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>
  417. </dt>
  418. <dd class="phpdocumentor-argument-list__definition">
  419. <section class="phpdocumentor-description"></section>
  420. </dd>
  421. </dl>
  422. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  423. <span class="phpdocumentor-signature__response_type">mixed</span>
  424. &mdash;
  425. </article>
  426. <article
  427. class="phpdocumentor-element
  428. -method
  429. -protected
  430. "
  431. >
  432. <h4 class="phpdocumentor-element__name" id="method_base64encode">
  433. base64encode()
  434. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_base64encode" class="headerlink"><i class="fas fa-link"></i></a>
  435. </h4>
  436. <aside class="phpdocumentor-element-found-in">
  437. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  438. :
  439. <span class="phpdocumentor-element-found-in__line">110</span>
  440. </aside>
  441. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  442. <code class="phpdocumentor-code phpdocumentor-signature ">
  443. <span class="phpdocumentor-signature__visibility">protected</span>
  444. <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>
  445. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  446. <dl class="phpdocumentor-argument-list">
  447. <dt class="phpdocumentor-argument-list__entry">
  448. <span class="phpdocumentor-signature__argument__name">$data</span>
  449. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  450. </dt>
  451. <dd class="phpdocumentor-argument-list__definition">
  452. <section class="phpdocumentor-description"></section>
  453. </dd>
  454. <dt class="phpdocumentor-argument-list__entry">
  455. <span class="phpdocumentor-signature__argument__name">$mime</span>
  456. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  457. </dt>
  458. <dd class="phpdocumentor-argument-list__definition">
  459. <section class="phpdocumentor-description"></section>
  460. </dd>
  461. </dl>
  462. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  463. <span class="phpdocumentor-signature__response_type">string</span>
  464. &mdash;
  465. </article>
  466. <article
  467. class="phpdocumentor-element
  468. -method
  469. -protected
  470. -abstract "
  471. >
  472. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  473. getDefaultModuleValue()
  474. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  475. </h4>
  476. <aside class="phpdocumentor-element-found-in">
  477. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  478. :
  479. <span class="phpdocumentor-element-found-in__line">105</span>
  480. </aside>
  481. <p class="phpdocumentor-summary">Returns a defualt value for either dark or light modules (return value depends on the output module)</p>
  482. <code class="phpdocumentor-code phpdocumentor-signature ">
  483. <span class="phpdocumentor-signature__visibility">protected</span>
  484. <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>
  485. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  486. <dl class="phpdocumentor-argument-list">
  487. <dt class="phpdocumentor-argument-list__entry">
  488. <span class="phpdocumentor-signature__argument__name">$isDark</span>
  489. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  490. </dt>
  491. <dd class="phpdocumentor-argument-list__definition">
  492. <section class="phpdocumentor-description"></section>
  493. </dd>
  494. </dl>
  495. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  496. <span class="phpdocumentor-signature__response_type">mixed</span>
  497. &mdash;
  498. </article>
  499. <article
  500. class="phpdocumentor-element
  501. -method
  502. -protected
  503. -abstract "
  504. >
  505. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  506. getModuleValue()
  507. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  508. </h4>
  509. <aside class="phpdocumentor-element-found-in">
  510. <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>
  511. :
  512. <span class="phpdocumentor-element-found-in__line">98</span>
  513. </aside>
  514. <p class="phpdocumentor-summary">Returns the final value for the given input (return value depends on the output module)</p>
  515. <code class="phpdocumentor-code phpdocumentor-signature ">
  516. <span class="phpdocumentor-signature__visibility">protected</span>
  517. <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>
  518. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  519. <dl class="phpdocumentor-argument-list">
  520. <dt class="phpdocumentor-argument-list__entry">
  521. <span class="phpdocumentor-signature__argument__name">$value</span>
  522. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  523. </dt>
  524. <dd class="phpdocumentor-argument-list__definition">
  525. </dd>
  526. </dl>
  527. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  528. <span class="phpdocumentor-signature__response_type">mixed</span>
  529. &mdash;
  530. </article>
  531. <article
  532. class="phpdocumentor-element
  533. -method
  534. -protected
  535. -abstract "
  536. >
  537. <h4 class="phpdocumentor-element__name" id="method_moduleValueIsValid">
  538. moduleValueIsValid()
  539. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_moduleValueIsValid" class="headerlink"><i class="fas fa-link"></i></a>
  540. </h4>
  541. <aside class="phpdocumentor-element-found-in">
  542. <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>
  543. :
  544. <span class="phpdocumentor-element-found-in__line">89</span>
  545. </aside>
  546. <p class="phpdocumentor-summary">Determines whether the given value is valid</p>
  547. <code class="phpdocumentor-code phpdocumentor-signature ">
  548. <span class="phpdocumentor-signature__visibility">protected</span>
  549. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">moduleValueIsValid</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  550. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  551. <dl class="phpdocumentor-argument-list">
  552. <dt class="phpdocumentor-argument-list__entry">
  553. <span class="phpdocumentor-signature__argument__name">$value</span>
  554. : <span class="phpdocumentor-signature__argument__return-type">mixed|null</span>
  555. </dt>
  556. <dd class="phpdocumentor-argument-list__definition">
  557. </dd>
  558. </dl>
  559. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  560. <span class="phpdocumentor-signature__response_type">bool</span>
  561. &mdash;
  562. </article>
  563. <article
  564. class="phpdocumentor-element
  565. -method
  566. -protected
  567. "
  568. >
  569. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  570. saveToFile()
  571. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" class="headerlink"><i class="fas fa-link"></i></a>
  572. </h4>
  573. <aside class="phpdocumentor-element-found-in">
  574. <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>
  575. :
  576. <span class="phpdocumentor-element-found-in__line">122</span>
  577. </aside>
  578. <p class="phpdocumentor-summary">saves the qr data to a file</p>
  579. <code class="phpdocumentor-code phpdocumentor-signature ">
  580. <span class="phpdocumentor-signature__visibility">protected</span>
  581. <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>
  582. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  583. <dl class="phpdocumentor-argument-list">
  584. <dt class="phpdocumentor-argument-list__entry">
  585. <span class="phpdocumentor-signature__argument__name">$data</span>
  586. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  587. </dt>
  588. <dd class="phpdocumentor-argument-list__definition">
  589. <section class="phpdocumentor-description"></section>
  590. </dd>
  591. <dt class="phpdocumentor-argument-list__entry">
  592. <span class="phpdocumentor-signature__argument__name">$file</span>
  593. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  594. </dt>
  595. <dd class="phpdocumentor-argument-list__definition">
  596. <section class="phpdocumentor-description"></section>
  597. </dd>
  598. </dl>
  599. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  600. Tags
  601. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  602. </h5>
  603. <dl class="phpdocumentor-tag-list">
  604. <dt class="phpdocumentor-tag-list__entry">
  605. <span class="phpdocumentor-tag__name">see</span>
  606. </dt>
  607. <dd class="phpdocumentor-tag-list__definition">
  608. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  609. </dd>
  610. <dt class="phpdocumentor-tag-list__entry">
  611. <span class="phpdocumentor-tag__name">see</span>
  612. </dt>
  613. <dd class="phpdocumentor-tag-list__definition">
  614. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::cachefile">QROptions::cachefile</abbr></span>
  615. </dd>
  616. <dt class="phpdocumentor-tag-list__entry">
  617. <span class="phpdocumentor-tag__name">throws</span>
  618. </dt>
  619. <dd class="phpdocumentor-tag-list__definition">
  620. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  621. </dd>
  622. </dl>
  623. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  624. <span class="phpdocumentor-signature__response_type">void</span>
  625. &mdash;
  626. </article>
  627. <article
  628. class="phpdocumentor-element
  629. -method
  630. -protected
  631. "
  632. >
  633. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  634. setModuleValues()
  635. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  636. </h4>
  637. <aside class="phpdocumentor-element-found-in">
  638. <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>
  639. :
  640. <span class="phpdocumentor-element-found-in__line">72</span>
  641. </aside>
  642. <p class="phpdocumentor-summary">Sets the initial module values</p>
  643. <code class="phpdocumentor-code phpdocumentor-signature ">
  644. <span class="phpdocumentor-signature__visibility">protected</span>
  645. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  646. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  647. <span class="phpdocumentor-signature__response_type">void</span>
  648. &mdash;
  649. </article>
  650. </section>
  651. <script type="text/javascript">
  652. function loadExternalCodeSnippets(line) {
  653. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  654. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  655. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  656. var language = 'php';
  657. var code = document.createElement('code');
  658. code.className = 'language-' + language;
  659. pre.textContent = '';
  660. pre.setAttribute('data-line', line)
  661. code.textContent = 'Loading…';
  662. pre.appendChild(code);
  663. var xhr = new XMLHttpRequest();
  664. xhr.open('GET', src, true);
  665. xhr.onreadystatechange = function () {
  666. if (xhr.readyState == 4) {
  667. if (xhr.status < 400 && xhr.responseText) {
  668. code.textContent = xhr.responseText;
  669. Prism.highlightElement(code);
  670. }
  671. else if (xhr.status >= 400) {
  672. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  673. }
  674. else {
  675. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  676. }
  677. }
  678. };
  679. xhr.send(null);
  680. });
  681. }
  682. var modals = document.querySelectorAll("[data-modal]");
  683. modals.forEach(function (trigger) {
  684. trigger.addEventListener("click", function (event) {
  685. //event.preventDefault();
  686. const modal = document.getElementById(trigger.dataset.modal);
  687. modal.classList.add("phpdocumentor-modal__open");
  688. loadExternalCodeSnippets(trigger.dataset.line)
  689. const exits = modal.querySelectorAll("[data-exit-button]");
  690. exits.forEach(function (exit) {
  691. exit.addEventListener("click", function (event) {
  692. event.preventDefault();
  693. modal.classList.remove("phpdocumentor-modal__open");
  694. });
  695. });
  696. });
  697. });
  698. </script>
  699. </article>
  700. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  701. <section class="phpdocumentor-search-results__dialog">
  702. <header class="phpdocumentor-search-results__header">
  703. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  704. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  705. </header>
  706. <section class="phpdocumentor-search-results__body">
  707. <ul class="phpdocumentor-search-results__entries"></ul>
  708. </section>
  709. </section>
  710. </section>
  711. </div>
  712. </div>
  713. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  714. </main>
  715. <script>
  716. cssVars({});
  717. </script>
  718. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  719. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  720. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  721. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  722. </body>
  723. </html>