chillerlan-QRCode-Output-QRImage.html 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. </section>
  82. <section class="phpdocumentor-sidebar__category">
  83. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  84. <h4 class="phpdocumentor-sidebar__root-namespace">
  85. <a href="packages/Application.html" class="">Application</a>
  86. </h4>
  87. </section>
  88. <section class="phpdocumentor-sidebar__category">
  89. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  92. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  93. </section>
  94. <section class="phpdocumentor-sidebar__category">
  95. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  96. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  97. </section>
  98. </aside>
  99. <div class="phpdocumentor-column -nine phpdocumentor-content">
  100. <section>
  101. <ul class="phpdocumentor-breadcrumbs">
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  103. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  104. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-output.html">Output</a></li>
  105. </ul>
  106. <article class="phpdocumentor-element -class">
  107. <h2 class="phpdocumentor-content__title">
  108. QRImage
  109. <span class="phpdocumentor-element__extends">
  110. extends <a href="classes/chillerlan-QRCode-Output-QRGdImage.html"><abbr title="\chillerlan\QRCode\Output\QRGdImage">QRGdImage</abbr></a>
  111. </span>
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. </div>
  121. <aside class="phpdocumentor-element-found-in">
  122. <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>
  123. :
  124. <span class="phpdocumentor-element-found-in__line">17</span>
  125. </aside>
  126. <p class="phpdocumentor-summary">Converts the matrix into GD images, raw or base64 output (requires ext-gd)</p>
  127. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  128. Tags
  129. <a href="classes/chillerlan-QRCode-Output-QRImage.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  130. </h5>
  131. <dl class="phpdocumentor-tag-list">
  132. <dt class="phpdocumentor-tag-list__entry">
  133. <span class="phpdocumentor-tag__name">deprecated</span>
  134. </dt>
  135. <dd class="phpdocumentor-tag-list__definition">
  136. <span class="phpdocumentor-tag-link">5.0.0</span>
  137. <section class="phpdocumentor-description"><p>backward compatibility, use QRGdImage instead</p>
  138. </section>
  139. </dd>
  140. <dt class="phpdocumentor-tag-list__entry">
  141. <span class="phpdocumentor-tag__name">see</span>
  142. </dt>
  143. <dd class="phpdocumentor-tag-list__definition">
  144. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRGdImage.html"><abbr title="\chillerlan\QRCode\Output\QRGdImage">QRGdImage</abbr></a></span>
  145. </dd>
  146. </dl>
  147. <h3 id="toc">
  148. Table of Contents
  149. <a href="classes/chillerlan-QRCode-Output-QRImage.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  150. </h3>
  151. <h4 id="toc-properties">
  152. Properties
  153. <a href="classes/chillerlan-QRCode-Output-QRImage.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  154. </h4>
  155. <dl class="phpdocumentor-table-of-contents">
  156. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  157. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_background">$background</a>
  158. <span>
  159. &nbsp;: int </span>
  160. </dt>
  161. <dd>The allocated background color</dd>
  162. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  163. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_image">$image</a>
  164. <span>
  165. &nbsp;: resource|<abbr title="\GdImage">GdImage</abbr> </span>
  166. </dt>
  167. <dd>The GD image resource</dd>
  168. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  169. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length</a>
  170. <span>
  171. &nbsp;: int </span>
  172. </dt>
  173. <dd>the side length of the QR image (modules * scale)</dd>
  174. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  175. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix</a>
  176. <span>
  177. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a> </span>
  178. </dt>
  179. <dd>the (filled) data matrix object</dd>
  180. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  181. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount</a>
  182. <span>
  183. &nbsp;: int </span>
  184. </dt>
  185. <dd>the current size of the QR matrix</dd>
  186. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  187. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues</a>
  188. <span>
  189. &nbsp;: array&lt;string|int, mixed&gt; </span>
  190. </dt>
  191. <dd>an (optional) array of color values for the several QR matrix parts</dd>
  192. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  193. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options</a>
  194. <span>
  195. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a> </span>
  196. </dt>
  197. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  198. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale</a>
  199. <span>
  200. &nbsp;: int </span>
  201. </dt>
  202. <dd>the current scaling for a QR pixel</dd>
  203. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  204. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_upscaled">$upscaled</a>
  205. <span>
  206. &nbsp;: bool </span>
  207. </dt>
  208. <dd>Whether we&#039;re running in upscale mode (scale &lt; 20)</dd>
  209. </dl>
  210. <h4 id="toc-methods">
  211. Methods
  212. <a href="classes/chillerlan-QRCode-Output-QRImage.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  213. </h4>
  214. <dl class="phpdocumentor-table-of-contents">
  215. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  216. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a>
  217. <span>
  218. &nbsp;: mixed </span>
  219. </dt>
  220. <dd>QROutputAbstract constructor.</dd>
  221. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  222. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dump">dump()</a>
  223. <span>
  224. &nbsp;: string|resource|<abbr title="\GdImage">GdImage</abbr> </span>
  225. </dt>
  226. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  227. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_moduleValueIsValid">moduleValueIsValid()</a>
  228. <span>
  229. &nbsp;: bool </span>
  230. </dt>
  231. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  232. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_checkGD">checkGD()</a>
  233. <span>
  234. &nbsp;: void </span>
  235. </dt>
  236. <dd>Checks whether GD is installed and if the given mode is supported</dd>
  237. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  238. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a>
  239. <span>
  240. &nbsp;: array&lt;string|int, mixed&gt; </span>
  241. </dt>
  242. <dd>collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  243. returns an array with the transformed modules</dd>
  244. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  245. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_createImage">createImage()</a>
  246. <span>
  247. &nbsp;: <abbr title="\GdImage">GdImage</abbr>|resource </span>
  248. </dt>
  249. <dd>Creates a new GdImage resource and scales it if necessary</dd>
  250. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  251. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_drawImage">drawImage()</a>
  252. <span>
  253. &nbsp;: void </span>
  254. </dt>
  255. <dd>Draws the QR image</dd>
  256. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  257. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dumpImage">dumpImage()</a>
  258. <span>
  259. &nbsp;: string </span>
  260. </dt>
  261. <dd>Creates the final image by calling the desired GD output function</dd>
  262. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  263. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a>
  264. <span>
  265. &nbsp;: mixed|null </span>
  266. </dt>
  267. <dd>Returns a default value for either dark or light modules</dd>
  268. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  269. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a>
  270. <span>
  271. &nbsp;: mixed|null </span>
  272. </dt>
  273. <dd>Returns the prepared value for the given $M_TYPE</dd>
  274. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  275. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a>
  276. <span>
  277. &nbsp;: mixed|null </span>
  278. </dt>
  279. <dd>Returns the prepared module value at the given coordinate [$x, $y] (convenience)</dd>
  280. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  281. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_module">module()</a>
  282. <span>
  283. &nbsp;: void </span>
  284. </dt>
  285. <dd>Creates a single QR pixel with the given settings</dd>
  286. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  287. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a>
  288. <span>
  289. &nbsp;: mixed|null </span>
  290. </dt>
  291. <dd>Prepares the value for the given input ()</dd>
  292. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  293. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a>
  294. <span>
  295. &nbsp;: void </span>
  296. </dt>
  297. <dd>Saves the qr $data to a $file. If $file is null, nothing happens.</dd>
  298. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  299. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_setBgColor">setBgColor()</a>
  300. <span>
  301. &nbsp;: void </span>
  302. </dt>
  303. <dd>Sets the background color</dd>
  304. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  305. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a>
  306. <span>
  307. &nbsp;: void </span>
  308. </dt>
  309. <dd>Sets/updates the matrix dimensions</dd>
  310. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  311. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a>
  312. <span>
  313. &nbsp;: void </span>
  314. </dt>
  315. <dd>Sets the initial module values</dd>
  316. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  317. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_setTransparencyColor">setTransparencyColor()</a>
  318. <span>
  319. &nbsp;: void </span>
  320. </dt>
  321. <dd>Sets the transparency color</dd>
  322. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  323. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a>
  324. <span>
  325. &nbsp;: string </span>
  326. </dt>
  327. <dd>Returns a base64 data URI for the given string and mime type</dd>
  328. </dl>
  329. <section class="phpdocumentor-properties">
  330. <h3 class="phpdocumentor-elements__header" id="properties">
  331. Properties
  332. <a href="classes/chillerlan-QRCode-Output-QRImage.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  333. </h3>
  334. <article
  335. class="
  336. phpdocumentor-element
  337. -property
  338. -protected
  339. "
  340. >
  341. <h4 class="phpdocumentor-element__name" id="property_background">
  342. $background
  343. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_background" class="headerlink"><i class="fas fa-link"></i></a>
  344. <span class="phpdocumentor-element__modifiers">
  345. </span>
  346. </h4>
  347. <aside class="phpdocumentor-element-found-in">
  348. <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>
  349. :
  350. <span class="phpdocumentor-element-found-in__line">44</span>
  351. </aside>
  352. <p class="phpdocumentor-summary">The allocated background color</p>
  353. <code class="phpdocumentor-code phpdocumentor-signature ">
  354. <span class="phpdocumentor-signature__visibility">protected</span>
  355. <span class="phpdocumentor-signature__type">int</span>
  356. <span class="phpdocumentor-signature__name">$background</span>
  357. </code>
  358. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  359. Tags
  360. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_background#tags" class="headerlink"><i class="fas fa-link"></i></a>
  361. </h5>
  362. <dl class="phpdocumentor-tag-list">
  363. <dt class="phpdocumentor-tag-list__entry">
  364. <span class="phpdocumentor-tag__name">see</span>
  365. </dt>
  366. <dd class="phpdocumentor-tag-list__definition">
  367. <span class="phpdocumentor-tag-link"><abbr title="\imagecolorallocate()">imagecolorallocate()</abbr></span>
  368. </dd>
  369. </dl>
  370. </article>
  371. <article
  372. class="
  373. phpdocumentor-element
  374. -property
  375. -protected
  376. "
  377. >
  378. <h4 class="phpdocumentor-element__name" id="property_image">
  379. $image
  380. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_image" class="headerlink"><i class="fas fa-link"></i></a>
  381. <span class="phpdocumentor-element__modifiers">
  382. </span>
  383. </h4>
  384. <aside class="phpdocumentor-element-found-in">
  385. <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>
  386. :
  387. <span class="phpdocumentor-element-found-in__line">37</span>
  388. </aside>
  389. <p class="phpdocumentor-summary">The GD image resource</p>
  390. <code class="phpdocumentor-code phpdocumentor-signature ">
  391. <span class="phpdocumentor-signature__visibility">protected</span>
  392. <span class="phpdocumentor-signature__type">resource|<abbr title="\GdImage">GdImage</abbr></span>
  393. <span class="phpdocumentor-signature__name">$image</span>
  394. </code>
  395. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  396. Tags
  397. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_image#tags" class="headerlink"><i class="fas fa-link"></i></a>
  398. </h5>
  399. <dl class="phpdocumentor-tag-list">
  400. <dt class="phpdocumentor-tag-list__entry">
  401. <span class="phpdocumentor-tag__name">see</span>
  402. </dt>
  403. <dd class="phpdocumentor-tag-list__definition">
  404. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\imagecreatetruecolor()">imagecreatetruecolor()</abbr></span>
  405. </dd>
  406. </dl>
  407. </article>
  408. <article
  409. class="
  410. phpdocumentor-element
  411. -property
  412. -protected
  413. "
  414. >
  415. <h4 class="phpdocumentor-element__name" id="property_length">
  416. $length
  417. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length" 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">40</span>
  425. </aside>
  426. <p class="phpdocumentor-summary">the side length of the QR image (modules * scale)</p>
  427. <code class="phpdocumentor-code phpdocumentor-signature ">
  428. <span class="phpdocumentor-signature__visibility">protected</span>
  429. <span class="phpdocumentor-signature__type">int</span>
  430. <span class="phpdocumentor-signature__name">$length</span>
  431. </code>
  432. </article>
  433. <article
  434. class="
  435. phpdocumentor-element
  436. -property
  437. -protected
  438. "
  439. >
  440. <h4 class="phpdocumentor-element__name" id="property_matrix">
  441. $matrix
  442. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  443. <span class="phpdocumentor-element__modifiers">
  444. </span>
  445. </h4>
  446. <aside class="phpdocumentor-element-found-in">
  447. <abbr class="phpdocumentor-element-found-in__file" title="src/Output/QROutputAbstract.php"><a href="files/src-output-qroutputabstract.html"><abbr title="src/Output/QROutputAbstract.php">QROutputAbstract.php</abbr></a></abbr>
  448. :
  449. <span class="phpdocumentor-element-found-in__line">50</span>
  450. </aside>
  451. <p class="phpdocumentor-summary">the (filled) data matrix object</p>
  452. <code class="phpdocumentor-code phpdocumentor-signature ">
  453. <span class="phpdocumentor-signature__visibility">protected</span>
  454. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html"><abbr title="\chillerlan\QRCode\Data\QRMatrix">QRMatrix</abbr></a></span>
  455. <span class="phpdocumentor-signature__name">$matrix</span>
  456. </code>
  457. </article>
  458. <article
  459. class="
  460. phpdocumentor-element
  461. -property
  462. -protected
  463. "
  464. >
  465. <h4 class="phpdocumentor-element__name" id="property_moduleCount">
  466. $moduleCount
  467. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount" class="headerlink"><i class="fas fa-link"></i></a>
  468. <span class="phpdocumentor-element__modifiers">
  469. </span>
  470. </h4>
  471. <aside class="phpdocumentor-element-found-in">
  472. <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>
  473. :
  474. <span class="phpdocumentor-element-found-in__line">28</span>
  475. </aside>
  476. <p class="phpdocumentor-summary">the current size of the QR matrix</p>
  477. <code class="phpdocumentor-code phpdocumentor-signature ">
  478. <span class="phpdocumentor-signature__visibility">protected</span>
  479. <span class="phpdocumentor-signature__type">int</span>
  480. <span class="phpdocumentor-signature__name">$moduleCount</span>
  481. </code>
  482. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  483. Tags
  484. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount#tags" class="headerlink"><i class="fas fa-link"></i></a>
  485. </h5>
  486. <dl class="phpdocumentor-tag-list">
  487. <dt class="phpdocumentor-tag-list__entry">
  488. <span class="phpdocumentor-tag__name">see</span>
  489. </dt>
  490. <dd class="phpdocumentor-tag-list__definition">
  491. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRMatrix.html#method_getSize"><abbr title="\chillerlan\QRCode\Data\QRMatrix::getSize()">QRMatrix::getSize()</abbr></a></span>
  492. </dd>
  493. </dl>
  494. </article>
  495. <article
  496. class="
  497. phpdocumentor-element
  498. -property
  499. -protected
  500. "
  501. >
  502. <h4 class="phpdocumentor-element__name" id="property_moduleValues">
  503. $moduleValues
  504. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues" class="headerlink"><i class="fas fa-link"></i></a>
  505. <span class="phpdocumentor-element__modifiers">
  506. </span>
  507. </h4>
  508. <aside class="phpdocumentor-element-found-in">
  509. <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>
  510. :
  511. <span class="phpdocumentor-element-found-in__line">45</span>
  512. </aside>
  513. <p class="phpdocumentor-summary">an (optional) array of color values for the several QR matrix parts</p>
  514. <code class="phpdocumentor-code phpdocumentor-signature ">
  515. <span class="phpdocumentor-signature__visibility">protected</span>
  516. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  517. <span class="phpdocumentor-signature__name">$moduleValues</span>
  518. </code>
  519. </article>
  520. <article
  521. class="
  522. phpdocumentor-element
  523. -property
  524. -protected
  525. "
  526. >
  527. <h4 class="phpdocumentor-element__name" id="property_options">
  528. $options
  529. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  530. <span class="phpdocumentor-element__modifiers">
  531. </span>
  532. </h4>
  533. <aside class="phpdocumentor-element-found-in">
  534. <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>
  535. :
  536. <span class="phpdocumentor-element-found-in__line">55</span>
  537. </aside>
  538. <code class="phpdocumentor-code phpdocumentor-signature ">
  539. <span class="phpdocumentor-signature__visibility">protected</span>
  540. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  541. <span class="phpdocumentor-signature__name">$options</span>
  542. </code>
  543. </article>
  544. <article
  545. class="
  546. phpdocumentor-element
  547. -property
  548. -protected
  549. "
  550. >
  551. <h4 class="phpdocumentor-element__name" id="property_scale">
  552. $scale
  553. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale" class="headerlink"><i class="fas fa-link"></i></a>
  554. <span class="phpdocumentor-element__modifiers">
  555. </span>
  556. </h4>
  557. <aside class="phpdocumentor-element-found-in">
  558. <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>
  559. :
  560. <span class="phpdocumentor-element-found-in__line">35</span>
  561. </aside>
  562. <p class="phpdocumentor-summary">the current scaling for a QR pixel</p>
  563. <code class="phpdocumentor-code phpdocumentor-signature ">
  564. <span class="phpdocumentor-signature__visibility">protected</span>
  565. <span class="phpdocumentor-signature__type">int</span>
  566. <span class="phpdocumentor-signature__name">$scale</span>
  567. </code>
  568. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  569. Tags
  570. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale#tags" class="headerlink"><i class="fas fa-link"></i></a>
  571. </h5>
  572. <dl class="phpdocumentor-tag-list">
  573. <dt class="phpdocumentor-tag-list__entry">
  574. <span class="phpdocumentor-tag__name">see</span>
  575. </dt>
  576. <dd class="phpdocumentor-tag-list__definition">
  577. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$scale">QROptions::$scale</abbr></span>
  578. </dd>
  579. </dl>
  580. </article>
  581. <article
  582. class="
  583. phpdocumentor-element
  584. -property
  585. -protected
  586. "
  587. >
  588. <h4 class="phpdocumentor-element__name" id="property_upscaled">
  589. $upscaled
  590. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_upscaled" class="headerlink"><i class="fas fa-link"></i></a>
  591. <span class="phpdocumentor-element__modifiers">
  592. </span>
  593. </h4>
  594. <aside class="phpdocumentor-element-found-in">
  595. <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>
  596. :
  597. <span class="phpdocumentor-element-found-in__line">51</span>
  598. </aside>
  599. <p class="phpdocumentor-summary">Whether we&#039;re running in upscale mode (scale &lt; 20)</p>
  600. <code class="phpdocumentor-code phpdocumentor-signature ">
  601. <span class="phpdocumentor-signature__visibility">protected</span>
  602. <span class="phpdocumentor-signature__type">bool</span>
  603. <span class="phpdocumentor-signature__name">$upscaled</span>
  604. = <span class="phpdocumentor-signature__default-value">false</span></code>
  605. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  606. Tags
  607. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_upscaled#tags" class="headerlink"><i class="fas fa-link"></i></a>
  608. </h5>
  609. <dl class="phpdocumentor-tag-list">
  610. <dt class="phpdocumentor-tag-list__entry">
  611. <span class="phpdocumentor-tag__name">see</span>
  612. </dt>
  613. <dd class="phpdocumentor-tag-list__definition">
  614. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$drawCircularModules">QROptions::$drawCircularModules</abbr></span>
  615. </dd>
  616. </dl>
  617. </article>
  618. </section>
  619. <section class="phpdocumentor-methods">
  620. <h3 class="phpdocumentor-elements__header" id="methods">
  621. Methods
  622. <a href="classes/chillerlan-QRCode-Output-QRImage.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  623. </h3>
  624. <article
  625. class="phpdocumentor-element
  626. -method
  627. -public
  628. "
  629. >
  630. <h4 class="phpdocumentor-element__name" id="method___construct">
  631. __construct()
  632. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  633. </h4>
  634. <aside class="phpdocumentor-element-found-in">
  635. <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>
  636. :
  637. <span class="phpdocumentor-element-found-in__line">60</span>
  638. </aside>
  639. <p class="phpdocumentor-summary">QROutputAbstract constructor.</p>
  640. <code class="phpdocumentor-code phpdocumentor-signature ">
  641. <span class="phpdocumentor-signature__visibility">public</span>
  642. <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>
  643. <div class="phpdocumentor-label-line">
  644. </div>
  645. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  646. <dl class="phpdocumentor-argument-list">
  647. <dt class="phpdocumentor-argument-list__entry">
  648. <span class="phpdocumentor-signature__argument__name">$options</span>
  649. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  650. </dt>
  651. <dd class="phpdocumentor-argument-list__definition">
  652. </dd>
  653. <dt class="phpdocumentor-argument-list__entry">
  654. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  655. : <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>
  656. </dt>
  657. <dd class="phpdocumentor-argument-list__definition">
  658. </dd>
  659. </dl>
  660. </article>
  661. <article
  662. class="phpdocumentor-element
  663. -method
  664. -public
  665. "
  666. >
  667. <h4 class="phpdocumentor-element__name" id="method_dump">
  668. dump()
  669. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dump" class="headerlink"><i class="fas fa-link"></i></a>
  670. </h4>
  671. <aside class="phpdocumentor-element-found-in">
  672. <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>
  673. :
  674. <span class="phpdocumentor-element-found-in__line">195</span>
  675. </aside>
  676. <code class="phpdocumentor-code phpdocumentor-signature ">
  677. <span class="phpdocumentor-signature__visibility">public</span>
  678. <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>
  679. <div class="phpdocumentor-label-line">
  680. </div>
  681. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  682. <dl class="phpdocumentor-argument-list">
  683. <dt class="phpdocumentor-argument-list__entry">
  684. <span class="phpdocumentor-signature__argument__name">$file</span>
  685. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  686. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  687. <dd class="phpdocumentor-argument-list__definition">
  688. </dd>
  689. </dl>
  690. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  691. Tags
  692. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dump#tags" class="headerlink"><i class="fas fa-link"></i></a>
  693. </h5>
  694. <dl class="phpdocumentor-tag-list">
  695. <dt class="phpdocumentor-tag-list__entry">
  696. <span class="phpdocumentor-tag__name">inheritDoc</span>
  697. </dt>
  698. <dd class="phpdocumentor-tag-list__definition">
  699. </dd>
  700. <dt class="phpdocumentor-tag-list__entry">
  701. <span class="phpdocumentor-tag__name">phan-suppress</span>
  702. </dt>
  703. <dd class="phpdocumentor-tag-list__definition">
  704. <section class="phpdocumentor-description"><p>PhanUndeclaredTypeReturnType, PhanTypeMismatchReturn</p>
  705. </section>
  706. </dd>
  707. <dt class="phpdocumentor-tag-list__entry">
  708. <span class="phpdocumentor-tag__name">throws</span>
  709. </dt>
  710. <dd class="phpdocumentor-tag-list__definition">
  711. <span class="phpdocumentor-tag-link"><abbr title="\ErrorException">ErrorException</abbr></span>
  712. </dd>
  713. </dl>
  714. <section>
  715. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  716. <span class="phpdocumentor-signature__response_type">string|resource|<abbr title="\GdImage">GdImage</abbr></span>
  717. </section>
  718. </article>
  719. <article
  720. class="phpdocumentor-element
  721. -method
  722. -public
  723. -static "
  724. >
  725. <h4 class="phpdocumentor-element__name" id="method_moduleValueIsValid">
  726. moduleValueIsValid()
  727. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_moduleValueIsValid" class="headerlink"><i class="fas fa-link"></i></a>
  728. </h4>
  729. <aside class="phpdocumentor-element-found-in">
  730. <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>
  731. :
  732. <span class="phpdocumentor-element-found-in__line">130</span>
  733. </aside>
  734. <code class="phpdocumentor-code phpdocumentor-signature ">
  735. <span class="phpdocumentor-signature__visibility">public</span>
  736. <span class="phpdocumentor-signature__static">static</span> <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>
  737. <div class="phpdocumentor-label-line">
  738. </div>
  739. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  740. <dl class="phpdocumentor-argument-list">
  741. <dt class="phpdocumentor-argument-list__entry">
  742. <span class="phpdocumentor-signature__argument__name">$value</span>
  743. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  744. </dt>
  745. <dd class="phpdocumentor-argument-list__definition">
  746. </dd>
  747. </dl>
  748. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  749. Tags
  750. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_moduleValueIsValid#tags" class="headerlink"><i class="fas fa-link"></i></a>
  751. </h5>
  752. <dl class="phpdocumentor-tag-list">
  753. <dt class="phpdocumentor-tag-list__entry">
  754. <span class="phpdocumentor-tag__name">inheritDoc</span>
  755. </dt>
  756. <dd class="phpdocumentor-tag-list__definition">
  757. </dd>
  758. </dl>
  759. <section>
  760. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  761. <span class="phpdocumentor-signature__response_type">bool</span>
  762. </section>
  763. </article>
  764. <article
  765. class="phpdocumentor-element
  766. -method
  767. -protected
  768. "
  769. >
  770. <h4 class="phpdocumentor-element__name" id="method_checkGD">
  771. checkGD()
  772. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_checkGD" class="headerlink"><i class="fas fa-link"></i></a>
  773. </h4>
  774. <aside class="phpdocumentor-element-found-in">
  775. <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>
  776. :
  777. <span class="phpdocumentor-element-found-in__line">78</span>
  778. </aside>
  779. <p class="phpdocumentor-summary">Checks whether GD is installed and if the given mode is supported</p>
  780. <code class="phpdocumentor-code phpdocumentor-signature ">
  781. <span class="phpdocumentor-signature__visibility">protected</span>
  782. <span class="phpdocumentor-signature__name">checkGD</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  783. <div class="phpdocumentor-label-line">
  784. </div>
  785. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  786. Tags
  787. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_checkGD#tags" class="headerlink"><i class="fas fa-link"></i></a>
  788. </h5>
  789. <dl class="phpdocumentor-tag-list">
  790. <dt class="phpdocumentor-tag-list__entry">
  791. <span class="phpdocumentor-tag__name">throws</span>
  792. </dt>
  793. <dd class="phpdocumentor-tag-list__definition">
  794. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  795. </dd>
  796. <dt class="phpdocumentor-tag-list__entry">
  797. <span class="phpdocumentor-tag__name">codeCoverageIgnore</span>
  798. </dt>
  799. <dd class="phpdocumentor-tag-list__definition">
  800. </dd>
  801. </dl>
  802. </article>
  803. <article
  804. class="phpdocumentor-element
  805. -method
  806. -protected
  807. "
  808. >
  809. <h4 class="phpdocumentor-element__name" id="method_collectModules">
  810. collectModules()
  811. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules" class="headerlink"><i class="fas fa-link"></i></a>
  812. </h4>
  813. <aside class="phpdocumentor-element-found-in">
  814. <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>
  815. :
  816. <span class="phpdocumentor-element-found-in__line">176</span>
  817. </aside>
  818. <p class="phpdocumentor-summary">collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
  819. returns an array with the transformed modules</p>
  820. <code class="phpdocumentor-code phpdocumentor-signature ">
  821. <span class="phpdocumentor-signature__visibility">protected</span>
  822. <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>
  823. <div class="phpdocumentor-label-line">
  824. </div>
  825. <section class="phpdocumentor-description"><p>The transform callback is called with the following parameters:</p>
  826. <p>$x - current column
  827. $y - current row
  828. $M_TYPE - field value
  829. $M_TYPE_LAYER - (possibly modified) field value that acts as layer id</p>
  830. </section>
  831. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  832. <dl class="phpdocumentor-argument-list">
  833. <dt class="phpdocumentor-argument-list__entry">
  834. <span class="phpdocumentor-signature__argument__name">$transform</span>
  835. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  836. </dt>
  837. <dd class="phpdocumentor-argument-list__definition">
  838. </dd>
  839. </dl>
  840. <section>
  841. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  842. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  843. </section>
  844. </article>
  845. <article
  846. class="phpdocumentor-element
  847. -method
  848. -protected
  849. "
  850. >
  851. <h4 class="phpdocumentor-element__name" id="method_createImage">
  852. createImage()
  853. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_createImage" class="headerlink"><i class="fas fa-link"></i></a>
  854. </h4>
  855. <aside class="phpdocumentor-element-found-in">
  856. <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>
  857. :
  858. <span class="phpdocumentor-element-found-in__line">115</span>
  859. </aside>
  860. <p class="phpdocumentor-summary">Creates a new GdImage resource and scales it if necessary</p>
  861. <code class="phpdocumentor-code phpdocumentor-signature ">
  862. <span class="phpdocumentor-signature__visibility">protected</span>
  863. <span class="phpdocumentor-signature__name">createImage</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\GdImage">GdImage</abbr>|resource</span></code>
  864. <div class="phpdocumentor-label-line">
  865. </div>
  866. <section class="phpdocumentor-description"><p>we're scaling the image up in order to draw crisp round circles, otherwise they appear square-y on small scales</p>
  867. </section>
  868. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  869. Tags
  870. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_createImage#tags" class="headerlink"><i class="fas fa-link"></i></a>
  871. </h5>
  872. <dl class="phpdocumentor-tag-list">
  873. <dt class="phpdocumentor-tag-list__entry">
  874. <span class="phpdocumentor-tag__name">see</span>
  875. </dt>
  876. <dd class="phpdocumentor-tag-list__definition">
  877. <span class="phpdocumentor-tag-link"><a href="https://github.com/chillerlan/php-qrcode/issues/23">https://github.com/chillerlan/php-qrcode/issues/23</a></span>
  878. </dd>
  879. </dl>
  880. <section>
  881. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  882. <span class="phpdocumentor-signature__response_type"><abbr title="\GdImage">GdImage</abbr>|resource</span>
  883. </section>
  884. </article>
  885. <article
  886. class="phpdocumentor-element
  887. -method
  888. -protected
  889. "
  890. >
  891. <h4 class="phpdocumentor-element__name" id="method_drawImage">
  892. drawImage()
  893. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_drawImage" class="headerlink"><i class="fas fa-link"></i></a>
  894. </h4>
  895. <aside class="phpdocumentor-element-found-in">
  896. <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>
  897. :
  898. <span class="phpdocumentor-element-found-in__line">275</span>
  899. </aside>
  900. <p class="phpdocumentor-summary">Draws the QR image</p>
  901. <code class="phpdocumentor-code phpdocumentor-signature ">
  902. <span class="phpdocumentor-signature__visibility">protected</span>
  903. <span class="phpdocumentor-signature__name">drawImage</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  904. <div class="phpdocumentor-label-line">
  905. </div>
  906. </article>
  907. <article
  908. class="phpdocumentor-element
  909. -method
  910. -protected
  911. "
  912. >
  913. <h4 class="phpdocumentor-element__name" id="method_dumpImage">
  914. dumpImage()
  915. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dumpImage" class="headerlink"><i class="fas fa-link"></i></a>
  916. </h4>
  917. <aside class="phpdocumentor-element-found-in">
  918. <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>
  919. :
  920. <span class="phpdocumentor-element-found-in__line">322</span>
  921. </aside>
  922. <p class="phpdocumentor-summary">Creates the final image by calling the desired GD output function</p>
  923. <code class="phpdocumentor-code phpdocumentor-signature ">
  924. <span class="phpdocumentor-signature__visibility">protected</span>
  925. <span class="phpdocumentor-signature__name">dumpImage</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  926. <div class="phpdocumentor-label-line">
  927. </div>
  928. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  929. Tags
  930. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dumpImage#tags" class="headerlink"><i class="fas fa-link"></i></a>
  931. </h5>
  932. <dl class="phpdocumentor-tag-list">
  933. <dt class="phpdocumentor-tag-list__entry">
  934. <span class="phpdocumentor-tag__name">throws</span>
  935. </dt>
  936. <dd class="phpdocumentor-tag-list__definition">
  937. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  938. </dd>
  939. </dl>
  940. <section>
  941. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  942. <span class="phpdocumentor-signature__response_type">string</span>
  943. </section>
  944. </article>
  945. <article
  946. class="phpdocumentor-element
  947. -method
  948. -protected
  949. -abstract "
  950. >
  951. <h4 class="phpdocumentor-element__name" id="method_getDefaultModuleValue">
  952. getDefaultModuleValue()
  953. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  954. </h4>
  955. <aside class="phpdocumentor-element-found-in">
  956. <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>
  957. :
  958. <span class="phpdocumentor-element-found-in__line">133</span>
  959. </aside>
  960. <p class="phpdocumentor-summary">Returns a default value for either dark or light modules</p>
  961. <code class="phpdocumentor-code phpdocumentor-signature ">
  962. <span class="phpdocumentor-signature__visibility">protected</span>
  963. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">getDefaultModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$isDark</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  964. <div class="phpdocumentor-label-line">
  965. </div>
  966. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  967. <dl class="phpdocumentor-argument-list">
  968. <dt class="phpdocumentor-argument-list__entry">
  969. <span class="phpdocumentor-signature__argument__name">$isDark</span>
  970. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  971. </dt>
  972. <dd class="phpdocumentor-argument-list__definition">
  973. </dd>
  974. </dl>
  975. <section>
  976. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  977. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  978. &mdash;
  979. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  980. </section>
  981. </section>
  982. </article>
  983. <article
  984. class="phpdocumentor-element
  985. -method
  986. -protected
  987. "
  988. >
  989. <h4 class="phpdocumentor-element__name" id="method_getModuleValue">
  990. getModuleValue()
  991. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  992. </h4>
  993. <aside class="phpdocumentor-element-found-in">
  994. <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>
  995. :
  996. <span class="phpdocumentor-element-found-in__line">100</span>
  997. </aside>
  998. <p class="phpdocumentor-summary">Returns the prepared value for the given $M_TYPE</p>
  999. <code class="phpdocumentor-code phpdocumentor-signature ">
  1000. <span class="phpdocumentor-signature__visibility">protected</span>
  1001. <span class="phpdocumentor-signature__name">getModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$M_TYPE</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  1002. <div class="phpdocumentor-label-line">
  1003. </div>
  1004. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1005. <dl class="phpdocumentor-argument-list">
  1006. <dt class="phpdocumentor-argument-list__entry">
  1007. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  1008. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1009. </dt>
  1010. <dd class="phpdocumentor-argument-list__definition">
  1011. </dd>
  1012. </dl>
  1013. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1014. Tags
  1015. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1016. </h5>
  1017. <dl class="phpdocumentor-tag-list">
  1018. <dt class="phpdocumentor-tag-list__entry">
  1019. <span class="phpdocumentor-tag__name">throws</span>
  1020. </dt>
  1021. <dd class="phpdocumentor-tag-list__definition">
  1022. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  1023. </dd>
  1024. </dl>
  1025. <section>
  1026. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1027. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  1028. &mdash;
  1029. <section class="phpdocumentor-description"><p>return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist</p>
  1030. </section>
  1031. </section>
  1032. </article>
  1033. <article
  1034. class="phpdocumentor-element
  1035. -method
  1036. -protected
  1037. "
  1038. >
  1039. <h4 class="phpdocumentor-element__name" id="method_getModuleValueAt">
  1040. getModuleValueAt()
  1041. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt" class="headerlink"><i class="fas fa-link"></i></a>
  1042. </h4>
  1043. <aside class="phpdocumentor-element-found-in">
  1044. <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>
  1045. :
  1046. <span class="phpdocumentor-element-found-in__line">115</span>
  1047. </aside>
  1048. <p class="phpdocumentor-summary">Returns the prepared module value at the given coordinate [$x, $y] (convenience)</p>
  1049. <code class="phpdocumentor-code phpdocumentor-signature ">
  1050. <span class="phpdocumentor-signature__visibility">protected</span>
  1051. <span class="phpdocumentor-signature__name">getModuleValueAt</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$x</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  1052. <div class="phpdocumentor-label-line">
  1053. </div>
  1054. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1055. <dl class="phpdocumentor-argument-list">
  1056. <dt class="phpdocumentor-argument-list__entry">
  1057. <span class="phpdocumentor-signature__argument__name">$x</span>
  1058. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1059. </dt>
  1060. <dd class="phpdocumentor-argument-list__definition">
  1061. </dd>
  1062. <dt class="phpdocumentor-argument-list__entry">
  1063. <span class="phpdocumentor-signature__argument__name">$y</span>
  1064. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1065. </dt>
  1066. <dd class="phpdocumentor-argument-list__definition">
  1067. </dd>
  1068. </dl>
  1069. <section>
  1070. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1071. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  1072. </section>
  1073. </article>
  1074. <article
  1075. class="phpdocumentor-element
  1076. -method
  1077. -protected
  1078. "
  1079. >
  1080. <h4 class="phpdocumentor-element__name" id="method_module">
  1081. module()
  1082. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_module" class="headerlink"><i class="fas fa-link"></i></a>
  1083. </h4>
  1084. <aside class="phpdocumentor-element-found-in">
  1085. <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>
  1086. :
  1087. <span class="phpdocumentor-element-found-in__line">286</span>
  1088. </aside>
  1089. <p class="phpdocumentor-summary">Creates a single QR pixel with the given settings</p>
  1090. <code class="phpdocumentor-code phpdocumentor-signature ">
  1091. <span class="phpdocumentor-signature__visibility">protected</span>
  1092. <span class="phpdocumentor-signature__name">module</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>
  1093. <div class="phpdocumentor-label-line">
  1094. </div>
  1095. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1096. <dl class="phpdocumentor-argument-list">
  1097. <dt class="phpdocumentor-argument-list__entry">
  1098. <span class="phpdocumentor-signature__argument__name">$x</span>
  1099. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1100. </dt>
  1101. <dd class="phpdocumentor-argument-list__definition">
  1102. </dd>
  1103. <dt class="phpdocumentor-argument-list__entry">
  1104. <span class="phpdocumentor-signature__argument__name">$y</span>
  1105. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1106. </dt>
  1107. <dd class="phpdocumentor-argument-list__definition">
  1108. </dd>
  1109. <dt class="phpdocumentor-argument-list__entry">
  1110. <span class="phpdocumentor-signature__argument__name">$M_TYPE</span>
  1111. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1112. </dt>
  1113. <dd class="phpdocumentor-argument-list__definition">
  1114. </dd>
  1115. </dl>
  1116. </article>
  1117. <article
  1118. class="phpdocumentor-element
  1119. -method
  1120. -protected
  1121. -abstract "
  1122. >
  1123. <h4 class="phpdocumentor-element__name" id="method_prepareModuleValue">
  1124. prepareModuleValue()
  1125. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue" class="headerlink"><i class="fas fa-link"></i></a>
  1126. </h4>
  1127. <aside class="phpdocumentor-element-found-in">
  1128. <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>
  1129. :
  1130. <span class="phpdocumentor-element-found-in__line">126</span>
  1131. </aside>
  1132. <p class="phpdocumentor-summary">Prepares the value for the given input ()</p>
  1133. <code class="phpdocumentor-code phpdocumentor-signature ">
  1134. <span class="phpdocumentor-signature__visibility">protected</span>
  1135. <span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">prepareModuleValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed|null</span></code>
  1136. <div class="phpdocumentor-label-line">
  1137. </div>
  1138. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1139. <dl class="phpdocumentor-argument-list">
  1140. <dt class="phpdocumentor-argument-list__entry">
  1141. <span class="phpdocumentor-signature__argument__name">$value</span>
  1142. : <span class="phpdocumentor-signature__argument__return-type">mixed</span>
  1143. </dt>
  1144. <dd class="phpdocumentor-argument-list__definition">
  1145. </dd>
  1146. </dl>
  1147. <section>
  1148. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1149. <span class="phpdocumentor-signature__response_type">mixed|null</span>
  1150. &mdash;
  1151. <section class="phpdocumentor-description"><p>return value depends on the output class</p>
  1152. </section>
  1153. </section>
  1154. </article>
  1155. <article
  1156. class="phpdocumentor-element
  1157. -method
  1158. -protected
  1159. "
  1160. >
  1161. <h4 class="phpdocumentor-element__name" id="method_saveToFile">
  1162. saveToFile()
  1163. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile" class="headerlink"><i class="fas fa-link"></i></a>
  1164. </h4>
  1165. <aside class="phpdocumentor-element-found-in">
  1166. <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>
  1167. :
  1168. <span class="phpdocumentor-element-found-in__line">150</span>
  1169. </aside>
  1170. <p class="phpdocumentor-summary">Saves the qr $data to a $file. If $file is null, nothing happens.</p>
  1171. <code class="phpdocumentor-code phpdocumentor-signature ">
  1172. <span class="phpdocumentor-signature__visibility">protected</span>
  1173. <span class="phpdocumentor-signature__name">saveToFile</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$file</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1174. <div class="phpdocumentor-label-line">
  1175. </div>
  1176. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1177. <dl class="phpdocumentor-argument-list">
  1178. <dt class="phpdocumentor-argument-list__entry">
  1179. <span class="phpdocumentor-signature__argument__name">$data</span>
  1180. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1181. </dt>
  1182. <dd class="phpdocumentor-argument-list__definition">
  1183. </dd>
  1184. <dt class="phpdocumentor-argument-list__entry">
  1185. <span class="phpdocumentor-signature__argument__name">$file</span>
  1186. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1187. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  1188. <dd class="phpdocumentor-argument-list__definition">
  1189. </dd>
  1190. </dl>
  1191. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1192. Tags
  1193. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1194. </h5>
  1195. <dl class="phpdocumentor-tag-list">
  1196. <dt class="phpdocumentor-tag-list__entry">
  1197. <span class="phpdocumentor-tag__name">see</span>
  1198. </dt>
  1199. <dd class="phpdocumentor-tag-list__definition">
  1200. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\Output\file_put_contents()">file_put_contents()</abbr></span>
  1201. </dd>
  1202. <dt class="phpdocumentor-tag-list__entry">
  1203. <span class="phpdocumentor-tag__name">see</span>
  1204. </dt>
  1205. <dd class="phpdocumentor-tag-list__definition">
  1206. <span class="phpdocumentor-tag-link"><abbr title="\chillerlan\QRCode\QROptions::$cachefile">QROptions::$cachefile</abbr></span>
  1207. </dd>
  1208. <dt class="phpdocumentor-tag-list__entry">
  1209. <span class="phpdocumentor-tag__name">throws</span>
  1210. </dt>
  1211. <dd class="phpdocumentor-tag-list__definition">
  1212. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Output-QRCodeOutputException.html"><abbr title="\chillerlan\QRCode\Output\QRCodeOutputException">QRCodeOutputException</abbr></a></span>
  1213. </dd>
  1214. </dl>
  1215. </article>
  1216. <article
  1217. class="phpdocumentor-element
  1218. -method
  1219. -protected
  1220. "
  1221. >
  1222. <h4 class="phpdocumentor-element__name" id="method_setBgColor">
  1223. setBgColor()
  1224. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_setBgColor" class="headerlink"><i class="fas fa-link"></i></a>
  1225. </h4>
  1226. <aside class="phpdocumentor-element-found-in">
  1227. <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>
  1228. :
  1229. <span class="phpdocumentor-element-found-in__line">239</span>
  1230. </aside>
  1231. <p class="phpdocumentor-summary">Sets the background color</p>
  1232. <code class="phpdocumentor-code phpdocumentor-signature ">
  1233. <span class="phpdocumentor-signature__visibility">protected</span>
  1234. <span class="phpdocumentor-signature__name">setBgColor</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1235. <div class="phpdocumentor-label-line">
  1236. </div>
  1237. </article>
  1238. <article
  1239. class="phpdocumentor-element
  1240. -method
  1241. -protected
  1242. "
  1243. >
  1244. <h4 class="phpdocumentor-element__name" id="method_setMatrixDimensions">
  1245. setMatrixDimensions()
  1246. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions" class="headerlink"><i class="fas fa-link"></i></a>
  1247. </h4>
  1248. <aside class="phpdocumentor-element-found-in">
  1249. <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>
  1250. :
  1251. <span class="phpdocumentor-element-found-in__line">73</span>
  1252. </aside>
  1253. <p class="phpdocumentor-summary">Sets/updates the matrix dimensions</p>
  1254. <code class="phpdocumentor-code phpdocumentor-signature ">
  1255. <span class="phpdocumentor-signature__visibility">protected</span>
  1256. <span class="phpdocumentor-signature__name">setMatrixDimensions</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1257. <div class="phpdocumentor-label-line">
  1258. </div>
  1259. <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>
  1260. </section>
  1261. </article>
  1262. <article
  1263. class="phpdocumentor-element
  1264. -method
  1265. -protected
  1266. "
  1267. >
  1268. <h4 class="phpdocumentor-element__name" id="method_setModuleValues">
  1269. setModuleValues()
  1270. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues" class="headerlink"><i class="fas fa-link"></i></a>
  1271. </h4>
  1272. <aside class="phpdocumentor-element-found-in">
  1273. <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>
  1274. :
  1275. <span class="phpdocumentor-element-found-in__line">82</span>
  1276. </aside>
  1277. <p class="phpdocumentor-summary">Sets the initial module values</p>
  1278. <code class="phpdocumentor-code phpdocumentor-signature ">
  1279. <span class="phpdocumentor-signature__visibility">protected</span>
  1280. <span class="phpdocumentor-signature__name">setModuleValues</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1281. <div class="phpdocumentor-label-line">
  1282. </div>
  1283. </article>
  1284. <article
  1285. class="phpdocumentor-element
  1286. -method
  1287. -protected
  1288. "
  1289. >
  1290. <h4 class="phpdocumentor-element__name" id="method_setTransparencyColor">
  1291. setTransparencyColor()
  1292. <a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_setTransparencyColor" class="headerlink"><i class="fas fa-link"></i></a>
  1293. </h4>
  1294. <aside class="phpdocumentor-element-found-in">
  1295. <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>
  1296. :
  1297. <span class="phpdocumentor-element-found-in__line">257</span>
  1298. </aside>
  1299. <p class="phpdocumentor-summary">Sets the transparency color</p>
  1300. <code class="phpdocumentor-code phpdocumentor-signature ">
  1301. <span class="phpdocumentor-signature__visibility">protected</span>
  1302. <span class="phpdocumentor-signature__name">setTransparencyColor</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  1303. <div class="phpdocumentor-label-line">
  1304. </div>
  1305. </article>
  1306. <article
  1307. class="phpdocumentor-element
  1308. -method
  1309. -protected
  1310. "
  1311. >
  1312. <h4 class="phpdocumentor-element__name" id="method_toBase64DataURI">
  1313. toBase64DataURI()
  1314. <a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI" class="headerlink"><i class="fas fa-link"></i></a>
  1315. </h4>
  1316. <aside class="phpdocumentor-element-found-in">
  1317. <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>
  1318. :
  1319. <span class="phpdocumentor-element-found-in__line">138</span>
  1320. </aside>
  1321. <p class="phpdocumentor-summary">Returns a base64 data URI for the given string and mime type</p>
  1322. <code class="phpdocumentor-code phpdocumentor-signature ">
  1323. <span class="phpdocumentor-signature__visibility">protected</span>
  1324. <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>
  1325. <div class="phpdocumentor-label-line">
  1326. </div>
  1327. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1328. <dl class="phpdocumentor-argument-list">
  1329. <dt class="phpdocumentor-argument-list__entry">
  1330. <span class="phpdocumentor-signature__argument__name">$data</span>
  1331. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1332. </dt>
  1333. <dd class="phpdocumentor-argument-list__definition">
  1334. </dd>
  1335. <dt class="phpdocumentor-argument-list__entry">
  1336. <span class="phpdocumentor-signature__argument__name">$mime</span>
  1337. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  1338. </dt>
  1339. <dd class="phpdocumentor-argument-list__definition">
  1340. </dd>
  1341. </dl>
  1342. <section>
  1343. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1344. <span class="phpdocumentor-signature__response_type">string</span>
  1345. </section>
  1346. </article>
  1347. </section>
  1348. <div class="phpdocumentor-modal" id="source-view">
  1349. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  1350. <div class="phpdocumentor-modal-container">
  1351. <div class="phpdocumentor-modal-content">
  1352. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Output/QRImage.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  1353. </div>
  1354. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  1355. </div>
  1356. </div>
  1357. <script type="text/javascript">
  1358. (function () {
  1359. function loadExternalCodeSnippet(el, url, line) {
  1360. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1361. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  1362. const language = 'php';
  1363. const code = document.createElement('code');
  1364. code.className = 'language-' + language;
  1365. pre.textContent = '';
  1366. pre.setAttribute('data-line', line)
  1367. code.textContent = 'Loading…';
  1368. pre.appendChild(code);
  1369. var xhr = new XMLHttpRequest();
  1370. xhr.open('GET', src, true);
  1371. xhr.onreadystatechange = function () {
  1372. if (xhr.readyState !== 4) {
  1373. return;
  1374. }
  1375. if (xhr.status < 400 && xhr.responseText) {
  1376. code.textContent = xhr.responseText;
  1377. Prism.highlightElement(code);
  1378. return;
  1379. }
  1380. if (xhr.status === 404) {
  1381. code.textContent = '✖ Error: File could not be found';
  1382. return;
  1383. }
  1384. if (xhr.status >= 400) {
  1385. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1386. return;
  1387. }
  1388. code.textContent = '✖ Error: An unknown error occurred';
  1389. };
  1390. xhr.send(null);
  1391. });
  1392. }
  1393. const modalButtons = document.querySelectorAll("[data-modal]");
  1394. const openedAsLocalFile = window.location.protocol === 'file:';
  1395. if (modalButtons.length > 0 && openedAsLocalFile) {
  1396. console.warn(
  1397. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  1398. 'browsers block XHR requests when a page is opened this way'
  1399. );
  1400. }
  1401. modalButtons.forEach(function (trigger) {
  1402. if (openedAsLocalFile) {
  1403. trigger.setAttribute("hidden", "hidden");
  1404. }
  1405. trigger.addEventListener("click", function (event) {
  1406. event.preventDefault();
  1407. const modal = document.getElementById(trigger.dataset.modal);
  1408. if (!modal) {
  1409. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  1410. return;
  1411. }
  1412. modal.classList.add("phpdocumentor-modal__open");
  1413. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  1414. const exits = modal.querySelectorAll("[data-exit-button]");
  1415. exits.forEach(function (exit) {
  1416. exit.addEventListener("click", function (event) {
  1417. event.preventDefault();
  1418. modal.classList.remove("phpdocumentor-modal__open");
  1419. });
  1420. });
  1421. });
  1422. });
  1423. })();
  1424. </script>
  1425. </article>
  1426. </section>
  1427. <section class="phpdocumentor-on-this-page__sidebar">
  1428. <section class="phpdocumentor-on-this-page__content">
  1429. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  1430. <ul class="phpdocumentor-list -clean">
  1431. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  1432. <li>
  1433. <ul class="phpdocumentor-list -clean">
  1434. <li><a href="classes/chillerlan-QRCode-Output-QRImage.html#toc-properties">Properties</a></li>
  1435. <li><a href="classes/chillerlan-QRCode-Output-QRImage.html#toc-methods">Methods</a></li>
  1436. </ul>
  1437. </li>
  1438. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  1439. <li>
  1440. <ul class="phpdocumentor-list -clean">
  1441. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_background">$background<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1442. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_image">$image<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1443. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_length">$length<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1444. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_matrix">$matrix<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1445. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleCount">$moduleCount<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1446. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_moduleValues">$moduleValues<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1447. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_options">$options<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1448. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#property_scale">$scale<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1449. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#property_upscaled">$upscaled<a href="classes/chillerlan-QRCode-Output-QRImage.html"></li>
  1450. </ul>
  1451. </li>
  1452. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  1453. <li>
  1454. <ul class="phpdocumentor-list -clean">
  1455. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method___construct">__construct()</a></li>
  1456. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dump">dump()</a></li>
  1457. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_moduleValueIsValid">moduleValueIsValid()</a></li>
  1458. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_checkGD">checkGD()</a></li>
  1459. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules">collectModules()</a></li>
  1460. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_createImage">createImage()</a></li>
  1461. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_drawImage">drawImage()</a></li>
  1462. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_dumpImage">dumpImage()</a></li>
  1463. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getDefaultModuleValue">getDefaultModuleValue()</a></li>
  1464. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValue">getModuleValue()</a></li>
  1465. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_getModuleValueAt">getModuleValueAt()</a></li>
  1466. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_module">module()</a></li>
  1467. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_prepareModuleValue">prepareModuleValue()</a></li>
  1468. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_saveToFile">saveToFile()</a></li>
  1469. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_setBgColor">setBgColor()</a></li>
  1470. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setMatrixDimensions">setMatrixDimensions()</a></li>
  1471. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_setModuleValues">setModuleValues()</a></li>
  1472. <li><a href="classes/chillerlan-QRCode-Output-QRGdImage.html#method_setTransparencyColor">setTransparencyColor()</a></li>
  1473. <li><a href="classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_toBase64DataURI">toBase64DataURI()</a></li>
  1474. </ul>
  1475. </li>
  1476. </ul>
  1477. </section>
  1478. </section>
  1479. </div>
  1480. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1481. <section class="phpdocumentor-search-results__dialog">
  1482. <header class="phpdocumentor-search-results__header">
  1483. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1484. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1485. </header>
  1486. <section class="phpdocumentor-search-results__body">
  1487. <ul class="phpdocumentor-search-results__entries"></ul>
  1488. </section>
  1489. </section>
  1490. </section>
  1491. </div>
  1492. <a href="classes/chillerlan-QRCode-Output-QRImage.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1493. </main>
  1494. <script>
  1495. cssVars({});
  1496. </script>
  1497. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1498. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1499. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1500. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1501. </body>
  1502. </html>