chillerlan-QRCode-Output-QROutputAbstract.html 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290
  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=Open+Sans:wght@100;200;300;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/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. </section>
  82. <section class="phpdocumentor-sidebar__category">
  83. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  84. <h4 class="phpdocumentor-sidebar__root-namespace">
  85. <a href="packages/Application.html" class="">Application</a>
  86. </h4>
  87. </section>
  88. <section class="phpdocumentor-sidebar__category">
  89. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  92. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  93. </section>
  94. <section class="phpdocumentor-sidebar__category">
  95. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  96. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  97. </section>
  98. </aside>
  99. <div class="phpdocumentor-column -nine phpdocumentor-content">
  100. <section>
  101. <ul class="phpdocumentor-breadcrumbs">
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  103. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  104. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-output.html">Output</a></li>
  105. </ul>
  106. <article class="phpdocumentor-element -class">
  107. <h2 class="phpdocumentor-content__title">
  108. QROutputAbstract
  109. <div class="phpdocumentor-element__package">
  110. in package
  111. <ul class="phpdocumentor-breadcrumbs">
  112. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  113. </ul>
  114. </div>
  115. <span class="phpdocumentor-element__implements">
  116. implements
  117. <a href="classes/chillerlan-QRCode-Output-QROutputInterface.html"><abbr title="\chillerlan\QRCode\Output\QROutputInterface">QROutputInterface</abbr></a> </span>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Abstract</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <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>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">21</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">common output abstract</p>
  128. <h3 id="toc">
  129. Table of Contents
  130. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  131. </h3>
  132. <h4 id="toc-interfaces">
  133. Interfaces
  134. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#toc-interfaces" class="headerlink"><i class="fas fa-link"></i></a>
  135. </h4>
  136. <dl class="phpdocumentor-table-of-contents">
  137. <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><dd>Converts the data matrix into readable output</dd> </dl>
  138. <h4 id="toc-properties">
  139. Properties
  140. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  141. </h4>
  142. <dl class="phpdocumentor-table-of-contents">
  143. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  144. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length</a>
  145. <span>
  146. &nbsp;: int </span>
  147. </dt>
  148. <dd>the side length of the QR image (modules * scale)</dd>
  149. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  150. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix</a>
  151. <span>
  152. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  153. </dt>
  154. <dd>the (filled) data matrix object</dd>
  155. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  156. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount</a>
  157. <span>
  158. &nbsp;: int </span>
  159. </dt>
  160. <dd>the current size of the QR matrix</dd>
  161. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  162. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues</a>
  163. <span>
  164. &nbsp;: array&lt;string|int, mixed&gt; </span>
  165. </dt>
  166. <dd>an (optional) array of color values for the several QR matrix parts</dd>
  167. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  168. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options</a>
  169. <span>
  170. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a> </span>
  171. </dt>
  172. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  173. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale</a>
  174. <span>
  175. &nbsp;: int </span>
  176. </dt>
  177. <dd>the current scaling for a QR pixel</dd>
  178. </dl>
  179. <h4 id="toc-methods">
  180. Methods
  181. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  182. </h4>
  183. <dl class="phpdocumentor-table-of-contents">
  184. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  185. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a>
  186. <span>
  187. &nbsp;: mixed </span>
  188. </dt>
  189. <dd>QROutputAbstract constructor.</dd>
  190. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  191. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a>
  192. <span>
  193. &nbsp;: array&lt;string|int, mixed&gt; </span>
  194. </dt>
  195. <dd>collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  196. returns an array with the transformed modules</dd>
  197. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  198. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a>
  199. <span>
  200. &nbsp;: mixed|null </span>
  201. </dt>
  202. <dd>Returns a default value for either dark or light modules</dd>
  203. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  204. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a>
  205. <span>
  206. &nbsp;: mixed|null </span>
  207. </dt>
  208. <dd>Returns the prepared value for the given $M_TYPE</dd>
  209. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  210. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a>
  211. <span>
  212. &nbsp;: mixed|null </span>
  213. </dt>
  214. <dd>Returns the prepared module value at the given coordinate [$x, $y] (convenience)</dd>
  215. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  216. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getOutputDimensions">getOutputDimensions()</a>
  217. <span>
  218. &nbsp;: array&lt;string|int, mixed&gt; </span>
  219. </dt>
  220. <dd>Returns a 2 element array with the current output width and height</dd>
  221. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  222. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a>
  223. <span>
  224. &nbsp;: mixed|null </span>
  225. </dt>
  226. <dd>Prepares the value for the given input ()</dd>
  227. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  228. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  229. <span>
  230. &nbsp;: void </span>
  231. </dt>
  232. <dd>Saves the qr $data to a $file. If $file is null, nothing happens.</dd>
  233. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  234. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a>
  235. <span>
  236. &nbsp;: void </span>
  237. </dt>
  238. <dd>Sets/updates the matrix dimensions</dd>
  239. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  240. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  241. <span>
  242. &nbsp;: void </span>
  243. </dt>
  244. <dd>Sets the initial module values</dd>
  245. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  246. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a>
  247. <span>
  248. &nbsp;: string </span>
  249. </dt>
  250. <dd>Returns a base64 data URI for the given string and mime type</dd>
  251. </dl>
  252. <section class="phpdocumentor-properties">
  253. <h3 class="phpdocumentor-elements__header" id="properties">
  254. Properties
  255. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  256. </h3>
  257. <article
  258. class="
  259. phpdocumentor-element
  260. -property
  261. -protected
  262. "
  263. >
  264. <h4 class="phpdocumentor-element__name" id="property_length">
  265. $length
  266. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" class="headerlink"><i class="fas fa-link"></i></a>
  267. <span class="phpdocumentor-element__modifiers">
  268. </span>
  269. </h4>
  270. <aside class="phpdocumentor-element-found-in">
  271. <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>
  272. :
  273. <span class="phpdocumentor-element-found-in__line">40</span>
  274. </aside>
  275. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  276. <code class="phpdocumentor-code phpdocumentor-signature ">
  277. <span class="phpdocumentor-signature__visibility">protected</span>
  278. <span class="phpdocumentor-signature__type">int</span>
  279. <span class="phpdocumentor-signature__name">$length</span>
  280. </code>
  281. </article>
  282. <article
  283. class="
  284. phpdocumentor-element
  285. -property
  286. -protected
  287. "
  288. >
  289. <h4 class="phpdocumentor-element__name" id="property_matrix">
  290. $matrix
  291. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  292. <span class="phpdocumentor-element__modifiers">
  293. </span>
  294. </h4>
  295. <aside class="phpdocumentor-element-found-in">
  296. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  297. :
  298. <span class="phpdocumentor-element-found-in__line">50</span>
  299. </aside>
  300. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  301. <code class="phpdocumentor-code phpdocumentor-signature ">
  302. <span class="phpdocumentor-signature__visibility">protected</span>
  303. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  304. <span class="phpdocumentor-signature__name">$matrix</span>
  305. </code>
  306. </article>
  307. <article
  308. class="
  309. phpdocumentor-element
  310. -property
  311. -protected
  312. "
  313. >
  314. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  315. $moduleCount
  316. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" class="headerlink"><i class="fas fa-link"></i></a>
  317. <span class="phpdocumentor-element__modifiers">
  318. </span>
  319. </h4>
  320. <aside class="phpdocumentor-element-found-in">
  321. <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>
  322. :
  323. <span class="phpdocumentor-element-found-in__line">28</span>
  324. </aside>
  325. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  326. <code class="phpdocumentor-code phpdocumentor-signature ">
  327. <span class="phpdocumentor-signature__visibility">protected</span>
  328. <span class="phpdocumentor-signature__type">int</span>
  329. <span class="phpdocumentor-signature__name">$moduleCount</span>
  330. </code>
  331. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  332. Tags
  333. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount#tags" class="headerlink"><i class="fas fa-link"></i></a>
  334. </h5>
  335. <dl class="phpdocumentor-tag-list">
  336. <dt class="phpdocumentor-tag-list__entry">
  337. <span class="phpdocumentor-tag__name">see</span>
  338. </dt>
  339. <dd class="phpdocumentor-tag-list__definition">
  340. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html#method_getSize"><abbr title="\chillerlan\QRCode\Data\QRMatrix::getSize()">QRMatrix::getSize()</abbr></a></span>
  341. </dd>
  342. </dl>
  343. </article>
  344. <article
  345. class="
  346. phpdocumentor-element
  347. -property
  348. -protected
  349. "
  350. >
  351. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  352. $moduleValues
  353. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  354. <span class="phpdocumentor-element__modifiers">
  355. </span>
  356. </h4>
  357. <aside class="phpdocumentor-element-found-in">
  358. <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>
  359. :
  360. <span class="phpdocumentor-element-found-in__line">45</span>
  361. </aside>
  362. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  363. <code class="phpdocumentor-code phpdocumentor-signature ">
  364. <span class="phpdocumentor-signature__visibility">protected</span>
  365. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  366. <span class="phpdocumentor-signature__name">$moduleValues</span>
  367. </code>
  368. </article>
  369. <article
  370. class="
  371. phpdocumentor-element
  372. -property
  373. -protected
  374. "
  375. >
  376. <h4 class="phpdocumentor-element__name" id="property_options">
  377. $options
  378. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  379. <span class="phpdocumentor-element__modifiers">
  380. </span>
  381. </h4>
  382. <aside class="phpdocumentor-element-found-in">
  383. <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>
  384. :
  385. <span class="phpdocumentor-element-found-in__line">55</span>
  386. </aside>
  387. <code class="phpdocumentor-code phpdocumentor-signature ">
  388. <span class="phpdocumentor-signature__visibility">protected</span>
  389. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  390. <span class="phpdocumentor-signature__name">$options</span>
  391. </code>
  392. </article>
  393. <article
  394. class="
  395. phpdocumentor-element
  396. -property
  397. -protected
  398. "
  399. >
  400. <h4 class="phpdocumentor-element__name" id="property_scale">
  401. $scale
  402. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  403. <span class="phpdocumentor-element__modifiers">
  404. </span>
  405. </h4>
  406. <aside class="phpdocumentor-element-found-in">
  407. <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>
  408. :
  409. <span class="phpdocumentor-element-found-in__line">35</span>
  410. </aside>
  411. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  412. <code class="phpdocumentor-code phpdocumentor-signature ">
  413. <span class="phpdocumentor-signature__visibility">protected</span>
  414. <span class="phpdocumentor-signature__type">int</span>
  415. <span class="phpdocumentor-signature__name">$scale</span>
  416. </code>
  417. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  418. Tags
  419. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale#tags" class="headerlink"><i class="fas fa-link"></i></a>
  420. </h5>
  421. <dl class="phpdocumentor-tag-list">
  422. <dt class="phpdocumentor-tag-list__entry">
  423. <span class="phpdocumentor-tag__name">see</span>
  424. </dt>
  425. <dd class="phpdocumentor-tag-list__definition">
  426. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  427. </dd>
  428. </dl>
  429. </article>
  430. </section>
  431. <section class="phpdocumentor-methods">
  432. <h3 class="phpdocumentor-elements__header" id="methods">
  433. Methods
  434. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  435. </h3>
  436. <article
  437. class="phpdocumentor-element
  438. -method
  439. -public
  440. "
  441. >
  442. <h4 class="phpdocumentor-element__name" id="method___construct">
  443. __construct()
  444. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  445. </h4>
  446. <aside class="phpdocumentor-element-found-in">
  447. <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>
  448. :
  449. <span class="phpdocumentor-element-found-in__line">60</span>
  450. </aside>
  451. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  452. <code class="phpdocumentor-code phpdocumentor-signature ">
  453. <span class="phpdocumentor-signature__visibility">public</span>
  454. <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>
  455. <div class="phpdocumentor-label-line">
  456. </div>
  457. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  458. <dl class="phpdocumentor-argument-list">
  459. <dt class="phpdocumentor-argument-list__entry">
  460. <span class="phpdocumentor-signature__argument__name">$options</span>
  461. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  462. </dt>
  463. <dd class="phpdocumentor-argument-list__definition">
  464. </dd>
  465. <dt class="phpdocumentor-argument-list__entry">
  466. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  467. : <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>
  468. </dt>
  469. <dd class="phpdocumentor-argument-list__definition">
  470. </dd>
  471. </dl>
  472. </article>
  473. <article
  474. class="phpdocumentor-element
  475. -method
  476. -protected
  477. "
  478. >
  479. <h4 class="phpdocumentor-element__name" id="method_collectModules">
  480. collectModules()
  481. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules" class="headerlink"><i class="fas fa-link"></i></a>
  482. </h4>
  483. <aside class="phpdocumentor-element-found-in">
  484. <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>
  485. :
  486. <span class="phpdocumentor-element-found-in__line">189</span>
  487. </aside>
  488. <p class="phpdocumentor-summary">collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  489. returns an array with the transformed modules</p>
  490. <code class="phpdocumentor-code phpdocumentor-signature ">
  491. <span class="phpdocumentor-signature__visibility">protected</span>
  492. <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>
  493. <div class="phpdocumentor-label-line">
  494. </div>
  495. <section class="phpdocumentor-description"><p>The transform callback is called with the following parameters:</p>
  496. <p>$x - current column
  497. $y - current row
  498. $M_TYPE - field value
  499. $M_TYPE_LAYER - (possibly modified) field value that acts as layer id</p>
  500. </section>
  501. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  502. <dl class="phpdocumentor-argument-list">
  503. <dt class="phpdocumentor-argument-list__entry">
  504. <span class="phpdocumentor-signature__argument__name">$transform</span>
  505. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  506. </dt>
  507. <dd class="phpdocumentor-argument-list__definition">
  508. </dd>
  509. </dl>
  510. <section>
  511. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  512. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  513. </section>
  514. </article>
  515. <article
  516. class="phpdocumentor-element
  517. -method
  518. -protected
  519. -abstract "
  520. >
  521. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  522. getDefaultModuleValue()
  523. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  524. </h4>
  525. <aside class="phpdocumentor-element-found-in">
  526. <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>
  527. :
  528. <span class="phpdocumentor-element-found-in__line">146</span>
  529. </aside>
  530. <p class="phpdocumentor-summary">Returns a default value for either dark or light modules</p>
  531. <code class="phpdocumentor-code phpdocumentor-signature ">
  532. <span class="phpdocumentor-signature__visibility">protected</span>
  533. <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|null</span></code>
  534. <div class="phpdocumentor-label-line">
  535. </div>
  536. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  537. <dl class="phpdocumentor-argument-list">
  538. <dt class="phpdocumentor-argument-list__entry">
  539. <span class="phpdocumentor-signature__argument__name">$isDark</span>
  540. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  541. </dt>
  542. <dd class="phpdocumentor-argument-list__definition">
  543. </dd>
  544. </dl>
  545. <section>
  546. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  547. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  548. &mdash;
  549. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  550. </section>
  551. </section>
  552. </article>
  553. <article
  554. class="phpdocumentor-element
  555. -method
  556. -protected
  557. "
  558. >
  559. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  560. getModuleValue()
  561. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  562. </h4>
  563. <aside class="phpdocumentor-element-found-in">
  564. <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>
  565. :
  566. <span class="phpdocumentor-element-found-in__line">113</span>
  567. </aside>
  568. <p class="phpdocumentor-summary">Returns the prepared value for the given $M_TYPE</p>
  569. <code class="phpdocumentor-code phpdocumentor-signature ">
  570. <span class="phpdocumentor-signature__visibility">protected</span>
  571. <span class="phpdocumentor-signature__name">getModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$M_TYPE</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  572. <div class="phpdocumentor-label-line">
  573. </div>
  574. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  575. <dl class="phpdocumentor-argument-list">
  576. <dt class="phpdocumentor-argument-list__entry">
  577. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  578. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  579. </dt>
  580. <dd class="phpdocumentor-argument-list__definition">
  581. </dd>
  582. </dl>
  583. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  584. Tags
  585. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue#tags" class="headerlink"><i class="fas fa-link"></i></a>
  586. </h5>
  587. <dl class="phpdocumentor-tag-list">
  588. <dt class="phpdocumentor-tag-list__entry">
  589. <span class="phpdocumentor-tag__name">throws</span>
  590. </dt>
  591. <dd class="phpdocumentor-tag-list__definition">
  592. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  593. </dd>
  594. </dl>
  595. <section>
  596. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  597. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  598. &mdash;
  599. <section class="phpdocumentor-description"><p>return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist</p>
  600. </section>
  601. </section>
  602. </article>
  603. <article
  604. class="phpdocumentor-element
  605. -method
  606. -protected
  607. "
  608. >
  609. <h4 class="phpdocumentor-element__name" id="method_getModuleValueAt">
  610. getModuleValueAt()
  611. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt" class="headerlink"><i class="fas fa-link"></i></a>
  612. </h4>
  613. <aside class="phpdocumentor-element-found-in">
  614. <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>
  615. :
  616. <span class="phpdocumentor-element-found-in__line">128</span>
  617. </aside>
  618. <p class="phpdocumentor-summary">Returns the prepared module value at the given coordinate [$x, $y] (convenience)</p>
  619. <code class="phpdocumentor-code phpdocumentor-signature ">
  620. <span class="phpdocumentor-signature__visibility">protected</span>
  621. <span class="phpdocumentor-signature__name">getModuleValueAt</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$x</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  622. <div class="phpdocumentor-label-line">
  623. </div>
  624. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  625. <dl class="phpdocumentor-argument-list">
  626. <dt class="phpdocumentor-argument-list__entry">
  627. <span class="phpdocumentor-signature__argument__name">$x</span>
  628. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  629. </dt>
  630. <dd class="phpdocumentor-argument-list__definition">
  631. </dd>
  632. <dt class="phpdocumentor-argument-list__entry">
  633. <span class="phpdocumentor-signature__argument__name">$y</span>
  634. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  635. </dt>
  636. <dd class="phpdocumentor-argument-list__definition">
  637. </dd>
  638. </dl>
  639. <section>
  640. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  641. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  642. </section>
  643. </article>
  644. <article
  645. class="phpdocumentor-element
  646. -method
  647. -protected
  648. "
  649. >
  650. <h4 class="phpdocumentor-element__name" id="method_getOutputDimensions">
  651. getOutputDimensions()
  652. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getOutputDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  653. </h4>
  654. <aside class="phpdocumentor-element-found-in">
  655. <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>
  656. :
  657. <span class="phpdocumentor-element-found-in__line">88</span>
  658. </aside>
  659. <p class="phpdocumentor-summary">Returns a 2 element array with the current output width and height</p>
  660. <code class="phpdocumentor-code phpdocumentor-signature ">
  661. <span class="phpdocumentor-signature__visibility">protected</span>
  662. <span class="phpdocumentor-signature__name">getOutputDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  663. <div class="phpdocumentor-label-line">
  664. </div>
  665. <section class="phpdocumentor-description"><p>The type and units of the values depend on the output class. The default value is the current module count * scale.</p>
  666. </section>
  667. <section>
  668. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  669. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  670. </section>
  671. </article>
  672. <article
  673. class="phpdocumentor-element
  674. -method
  675. -protected
  676. -abstract "
  677. >
  678. <h4 class="phpdocumentor-element__name" id="method_prepareModuleValue">
  679. prepareModuleValue()
  680. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue" 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">139</span>
  686. </aside>
  687. <p class="phpdocumentor-summary">Prepares the value for the given input ()</p>
  688. <code class="phpdocumentor-code phpdocumentor-signature ">
  689. <span class="phpdocumentor-signature__visibility">protected</span>
  690. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">prepareModuleValue</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|null</span></code>
  691. <div class="phpdocumentor-label-line">
  692. </div>
  693. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  694. <dl class="phpdocumentor-argument-list">
  695. <dt class="phpdocumentor-argument-list__entry">
  696. <span class="phpdocumentor-signature__argument__name">$value</span>
  697. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  698. </dt>
  699. <dd class="phpdocumentor-argument-list__definition">
  700. </dd>
  701. </dl>
  702. <section>
  703. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  704. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  705. &mdash;
  706. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  707. </section>
  708. </section>
  709. </article>
  710. <article
  711. class="phpdocumentor-element
  712. -method
  713. -protected
  714. "
  715. >
  716. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  717. saveToFile()
  718. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" class="headerlink"><i class="fas fa-link"></i></a>
  719. </h4>
  720. <aside class="phpdocumentor-element-found-in">
  721. <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>
  722. :
  723. <span class="phpdocumentor-element-found-in__line">163</span>
  724. </aside>
  725. <p class="phpdocumentor-summary">Saves the qr $data to a $file. If $file is null, nothing happens.</p>
  726. <code class="phpdocumentor-code phpdocumentor-signature ">
  727. <span class="phpdocumentor-signature__visibility">protected</span>
  728. <span class="phpdocumentor-signature__name">saveToFile</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$file</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  729. <div class="phpdocumentor-label-line">
  730. </div>
  731. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  732. <dl class="phpdocumentor-argument-list">
  733. <dt class="phpdocumentor-argument-list__entry">
  734. <span class="phpdocumentor-signature__argument__name">$data</span>
  735. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  736. </dt>
  737. <dd class="phpdocumentor-argument-list__definition">
  738. </dd>
  739. <dt class="phpdocumentor-argument-list__entry">
  740. <span class="phpdocumentor-signature__argument__name">$file</span>
  741. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  742. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  743. <dd class="phpdocumentor-argument-list__definition">
  744. </dd>
  745. </dl>
  746. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  747. Tags
  748. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile#tags" class="headerlink"><i class="fas fa-link"></i></a>
  749. </h5>
  750. <dl class="phpdocumentor-tag-list">
  751. <dt class="phpdocumentor-tag-list__entry">
  752. <span class="phpdocumentor-tag__name">see</span>
  753. </dt>
  754. <dd class="phpdocumentor-tag-list__definition">
  755. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  756. </dd>
  757. <dt class="phpdocumentor-tag-list__entry">
  758. <span class="phpdocumentor-tag__name">see</span>
  759. </dt>
  760. <dd class="phpdocumentor-tag-list__definition">
  761. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$cachefile">QROptions::$cachefile</abbr></span>
  762. </dd>
  763. <dt class="phpdocumentor-tag-list__entry">
  764. <span class="phpdocumentor-tag__name">throws</span>
  765. </dt>
  766. <dd class="phpdocumentor-tag-list__definition">
  767. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  768. </dd>
  769. </dl>
  770. </article>
  771. <article
  772. class="phpdocumentor-element
  773. -method
  774. -protected
  775. "
  776. >
  777. <h4 class="phpdocumentor-element__name" id="method_setMatrixDimensions">
  778. setMatrixDimensions()
  779. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  780. </h4>
  781. <aside class="phpdocumentor-element-found-in">
  782. <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>
  783. :
  784. <span class="phpdocumentor-element-found-in__line">77</span>
  785. </aside>
  786. <p class="phpdocumentor-summary">Sets/updates the matrix dimensions</p>
  787. <code class="phpdocumentor-code phpdocumentor-signature ">
  788. <span class="phpdocumentor-signature__visibility">protected</span>
  789. <span class="phpdocumentor-signature__name">setMatrixDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  790. <div class="phpdocumentor-label-line">
  791. </div>
  792. <section class="phpdocumentor-description"><p>Call this method if you modify the matrix from within your custom module in case the dimensions have been changed</p>
  793. </section>
  794. </article>
  795. <article
  796. class="phpdocumentor-element
  797. -method
  798. -protected
  799. "
  800. >
  801. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  802. setModuleValues()
  803. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  804. </h4>
  805. <aside class="phpdocumentor-element-found-in">
  806. <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>
  807. :
  808. <span class="phpdocumentor-element-found-in__line">95</span>
  809. </aside>
  810. <p class="phpdocumentor-summary">Sets the initial module values</p>
  811. <code class="phpdocumentor-code phpdocumentor-signature ">
  812. <span class="phpdocumentor-signature__visibility">protected</span>
  813. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  814. <div class="phpdocumentor-label-line">
  815. </div>
  816. </article>
  817. <article
  818. class="phpdocumentor-element
  819. -method
  820. -protected
  821. "
  822. >
  823. <h4 class="phpdocumentor-element__name" id="method_toBase64DataURI">
  824. toBase64DataURI()
  825. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI" class="headerlink"><i class="fas fa-link"></i></a>
  826. </h4>
  827. <aside class="phpdocumentor-element-found-in">
  828. <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>
  829. :
  830. <span class="phpdocumentor-element-found-in__line">151</span>
  831. </aside>
  832. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  833. <code class="phpdocumentor-code phpdocumentor-signature ">
  834. <span class="phpdocumentor-signature__visibility">protected</span>
  835. <span class="phpdocumentor-signature__name">toBase64DataURI</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$mime</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  836. <div class="phpdocumentor-label-line">
  837. </div>
  838. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  839. <dl class="phpdocumentor-argument-list">
  840. <dt class="phpdocumentor-argument-list__entry">
  841. <span class="phpdocumentor-signature__argument__name">$data</span>
  842. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  843. </dt>
  844. <dd class="phpdocumentor-argument-list__definition">
  845. </dd>
  846. <dt class="phpdocumentor-argument-list__entry">
  847. <span class="phpdocumentor-signature__argument__name">$mime</span>
  848. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  849. </dt>
  850. <dd class="phpdocumentor-argument-list__definition">
  851. </dd>
  852. </dl>
  853. <section>
  854. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  855. <span class="phpdocumentor-signature__response_type">string</span>
  856. </section>
  857. </article>
  858. </section>
  859. <div class="phpdocumentor-modal" id="source-view">
  860. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  861. <div class="phpdocumentor-modal-container">
  862. <div class="phpdocumentor-modal-content">
  863. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Output/QROutputAbstract.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  864. </div>
  865. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  866. </div>
  867. </div>
  868. <script type="text/javascript">
  869. (function () {
  870. function loadExternalCodeSnippet(el, url, line) {
  871. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  872. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  873. const language = 'php';
  874. const code = document.createElement('code');
  875. code.className = 'language-' + language;
  876. pre.textContent = '';
  877. pre.setAttribute('data-line', line)
  878. code.textContent = 'Loading…';
  879. pre.appendChild(code);
  880. var xhr = new XMLHttpRequest();
  881. xhr.open('GET', src, true);
  882. xhr.onreadystatechange = function () {
  883. if (xhr.readyState !== 4) {
  884. return;
  885. }
  886. if (xhr.status < 400 && xhr.responseText) {
  887. code.textContent = xhr.responseText;
  888. Prism.highlightElement(code);
  889. return;
  890. }
  891. if (xhr.status === 404) {
  892. code.textContent = '✖ Error: File could not be found';
  893. return;
  894. }
  895. if (xhr.status >= 400) {
  896. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  897. return;
  898. }
  899. code.textContent = '✖ Error: An unknown error occurred';
  900. };
  901. xhr.send(null);
  902. });
  903. }
  904. const modalButtons = document.querySelectorAll("[data-modal]");
  905. const openedAsLocalFile = window.location.protocol === 'file:';
  906. if (modalButtons.length > 0 && openedAsLocalFile) {
  907. console.warn(
  908. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  909. 'browsers block XHR requests when a page is opened this way'
  910. );
  911. }
  912. modalButtons.forEach(function (trigger) {
  913. if (openedAsLocalFile) {
  914. trigger.setAttribute("hidden", "hidden");
  915. }
  916. trigger.addEventListener("click", function (event) {
  917. event.preventDefault();
  918. const modal = document.getElementById(trigger.dataset.modal);
  919. if (!modal) {
  920. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  921. return;
  922. }
  923. modal.classList.add("phpdocumentor-modal__open");
  924. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  925. const exits = modal.querySelectorAll("[data-exit-button]");
  926. exits.forEach(function (exit) {
  927. exit.addEventListener("click", function (event) {
  928. event.preventDefault();
  929. modal.classList.remove("phpdocumentor-modal__open");
  930. });
  931. });
  932. });
  933. });
  934. })();
  935. </script>
  936. </article>
  937. </section>
  938. <section class="phpdocumentor-on-this-page__sidebar">
  939. <section class="phpdocumentor-on-this-page__content">
  940. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  941. <ul class="phpdocumentor-list -clean">
  942. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  943. <li>
  944. <ul class="phpdocumentor-list -clean">
  945. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#toc-properties">Properties</a></li>
  946. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#toc-methods">Methods</a></li>
  947. </ul>
  948. </li>
  949. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  950. <li>
  951. <ul class="phpdocumentor-list -clean">
  952. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length<a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"></li>
  953. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix<a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"></li>
  954. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount<a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"></li>
  955. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues<a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"></li>
  956. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options<a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"></li>
  957. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale<a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html"></li>
  958. </ul>
  959. </li>
  960. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  961. <li>
  962. <ul class="phpdocumentor-list -clean">
  963. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a></li>
  964. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a></li>
  965. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a></li>
  966. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a></li>
  967. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a></li>
  968. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getOutputDimensions">getOutputDimensions()</a></li>
  969. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a></li>
  970. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a></li>
  971. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a></li>
  972. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a></li>
  973. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a></li>
  974. </ul>
  975. </li>
  976. </ul>
  977. </section>
  978. </section>
  979. </div>
  980. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  981. <section class="phpdocumentor-search-results__dialog">
  982. <header class="phpdocumentor-search-results__header">
  983. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  984. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  985. </header>
  986. <section class="phpdocumentor-search-results__body">
  987. <ul class="phpdocumentor-search-results__entries"></ul>
  988. </section>
  989. </section>
  990. </section>
  991. </div>
  992. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  993. </main>
  994. <script>
  995. cssVars({});
  996. </script>
  997. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  998. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  999. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1000. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1001. </body>
  1002. </html>