chillerlan-QRCode-Output-QRGdImage.html 59 KB

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