chillerlan-QRCode-Output-QRImage.html 62 KB

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