chillerlan-QRCode-Output-QRImage.html 70 KB

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