chillerlan-QRCode-Output-QROutputAbstract.html 44 KB

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