chillerlan-QRCode-Output-QROutputAbstract.html 47 KB

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