chillerlan-QRCode-Common-MaskPattern.html 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438
  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. <li class="phpdocumentor-topnav__menu-item -menu">
  44. <a href="https://php-qrcode.readthedocs.io">
  45. <span>
  46. User Manual
  47. </span>
  48. </a>
  49. </li>
  50. <li class="phpdocumentor-topnav__menu-item -social">
  51. <a href="https://github.com/chillerlan/php-qrcode">
  52. <span>
  53. <i class="fab fa-github"></i>
  54. </span>
  55. </a>
  56. </li>
  57. </ul>
  58. </nav>
  59. </header>
  60. <main class="phpdocumentor">
  61. <div class="phpdocumentor-section">
  62. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  63. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  64. Menu
  65. </label>
  66. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  71. </h4>
  72. <ul class="phpdocumentor-list">
  73. <li>
  74. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  75. </li>
  76. <li>
  77. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  78. </li>
  79. </ul>
  80. </section>
  81. <section class="phpdocumentor-sidebar__category">
  82. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  83. <h4 class="phpdocumentor-sidebar__root-namespace">
  84. <a href="packages/Application.html" class="">Application</a>
  85. </h4>
  86. </section>
  87. <section class="phpdocumentor-sidebar__category">
  88. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  89. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  92. </section>
  93. <section class="phpdocumentor-sidebar__category">
  94. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  96. </section>
  97. </aside>
  98. <div class="phpdocumentor-column -eight phpdocumentor-content">
  99. <ul class="phpdocumentor-breadcrumbs">
  100. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  101. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  103. </ul>
  104. <article class="phpdocumentor-element -class">
  105. <h2 class="phpdocumentor-content__title">
  106. MaskPattern
  107. <div class="phpdocumentor-element__package">
  108. in package
  109. <ul class="phpdocumentor-breadcrumbs">
  110. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  111. </ul>
  112. </div>
  113. </h2>
  114. <aside class="phpdocumentor-element-found-in">
  115. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  116. :
  117. <span class="phpdocumentor-element-found-in__line">26</span>
  118. </aside>
  119. <p class="phpdocumentor-summary">ISO/IEC 18004:2000 Section 8.8.1
  120. ISO/IEC 18004:2000 Section 8.8.2 - Evaluation of masking results</p>
  121. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  122. Tags
  123. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  124. </h5>
  125. <dl class="phpdocumentor-tag-list">
  126. <dt class="phpdocumentor-tag-list__entry">
  127. <span class="phpdocumentor-tag__name">see</span>
  128. </dt>
  129. <dd class="phpdocumentor-tag-list__definition">
  130. <span class="phpdocumentor-tag-link"><a href="http://www.thonky.com/qr-code-tutorial/data-masking"><abbr title="http://www.thonky.com/qr-code-tutorial/data-masking">http://www.thonky.com/qr-code-tutorial/data-masking</abbr></a></span>
  131. </dd>
  132. <dt class="phpdocumentor-tag-list__entry">
  133. <span class="phpdocumentor-tag__name">see</span>
  134. </dt>
  135. <dd class="phpdocumentor-tag-list__definition">
  136. <span class="phpdocumentor-tag-link"><a href="https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/encoder/MaskUtil.java"><abbr title="https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/encoder/MaskUtil.java">https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/encoder/MaskUtil.java</abbr></a></span>
  137. </dd>
  138. </dl>
  139. <h3 id="toc">
  140. Table of Contents
  141. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  142. </h3>
  143. <dl class="phpdocumentor-table-of-contents">
  144. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  145. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_AUTO">AUTO</a>
  146. <span>
  147. &nbsp;= -1 </span>
  148. </dt>
  149. <dd></dd>
  150. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  151. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_000">PATTERN_000</a>
  152. <span>
  153. &nbsp;= 0b0 </span>
  154. </dt>
  155. <dd></dd>
  156. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  157. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_001">PATTERN_001</a>
  158. <span>
  159. &nbsp;= 0b1 </span>
  160. </dt>
  161. <dd></dd>
  162. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  163. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_010">PATTERN_010</a>
  164. <span>
  165. &nbsp;= 0b10 </span>
  166. </dt>
  167. <dd></dd>
  168. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  169. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_011">PATTERN_011</a>
  170. <span>
  171. &nbsp;= 0b11 </span>
  172. </dt>
  173. <dd></dd>
  174. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  175. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_100">PATTERN_100</a>
  176. <span>
  177. &nbsp;= 0b100 </span>
  178. </dt>
  179. <dd></dd>
  180. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  181. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_101">PATTERN_101</a>
  182. <span>
  183. &nbsp;= 0b101 </span>
  184. </dt>
  185. <dd></dd>
  186. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  187. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_110">PATTERN_110</a>
  188. <span>
  189. &nbsp;= 0b110 </span>
  190. </dt>
  191. <dd></dd>
  192. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  193. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_111">PATTERN_111</a>
  194. <span>
  195. &nbsp;= 0b111 </span>
  196. </dt>
  197. <dd></dd>
  198. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  199. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERNS">PATTERNS</a>
  200. <span>
  201. &nbsp;= [self::PATTERN_000, self::PATTERN_001, self::PATTERN_010, self::PATTERN_011, self::PATTERN_100, self::PATTERN_101, self::PATTERN_110, self::PATTERN_111] </span>
  202. </dt>
  203. <dd></dd>
  204. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  205. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#property_maskPattern">$maskPattern</a>
  206. <span>
  207. &nbsp;: int </span>
  208. </dt>
  209. <dd>The current mask pattern value (0-7)</dd>
  210. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  211. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method___construct">__construct()</a>
  212. <span>
  213. &nbsp;: mixed </span>
  214. </dt>
  215. <dd>MaskPattern constructor.</dd>
  216. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  217. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getBestPattern">getBestPattern()</a>
  218. <span>
  219. &nbsp;: self </span>
  220. </dt>
  221. <dd>Evaluates the matrix of the given data interface and returns a new mask pattern instance for the best result</dd>
  222. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  223. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getMask">getMask()</a>
  224. <span>
  225. &nbsp;: <abbr title="\Closure">Closure</abbr> </span>
  226. </dt>
  227. <dd>Returns a closure that applies the mask for the chosen mask pattern.</dd>
  228. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  229. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getPattern">getPattern()</a>
  230. <span>
  231. &nbsp;: int </span>
  232. </dt>
  233. <dd>Returns the current mask pattern</dd>
  234. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  235. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule1">testRule1()</a>
  236. <span>
  237. &nbsp;: int </span>
  238. </dt>
  239. <dd>Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and
  240. give penalty to them. Example: 00000 or 11111.</dd>
  241. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  242. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule2">testRule2()</a>
  243. <span>
  244. &nbsp;: int </span>
  245. </dt>
  246. <dd>Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give
  247. penalty to them. This is actually equivalent to the spec&#039;s rule, which is to find MxN blocks and give a
  248. penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block.</dd>
  249. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  250. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule3">testRule3()</a>
  251. <span>
  252. &nbsp;: int </span>
  253. </dt>
  254. <dd>Apply mask penalty rule 3 and return the penalty. Find consecutive runs of 1:1:3:1:1:4
  255. starting with black, or 4:1:1:3:1:1 starting with white, and give penalty to them. If we
  256. find patterns like 000010111010000, we give penalty once.</dd>
  257. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  258. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule4">testRule4()</a>
  259. <span>
  260. &nbsp;: int </span>
  261. </dt>
  262. <dd>Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give
  263. penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance.</dd>
  264. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  265. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_applyRule1">applyRule1()</a>
  266. <span>
  267. &nbsp;: int </span>
  268. </dt>
  269. <dd></dd>
  270. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  271. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_isWhiteHorizontal">isWhiteHorizontal()</a>
  272. <span>
  273. &nbsp;: bool </span>
  274. </dt>
  275. <dd></dd>
  276. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  277. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_isWhiteVertical">isWhiteVertical()</a>
  278. <span>
  279. &nbsp;: bool </span>
  280. </dt>
  281. <dd></dd>
  282. </dl>
  283. <section class="phpdocumentor-constants">
  284. <h3 class="phpdocumentor-elements__header" id="constants">
  285. Constants
  286. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  287. </h3>
  288. <article class="phpdocumentor-element -constant -public ">
  289. <h4 class="phpdocumentor-element__name" id="constant_AUTO">
  290. AUTO
  291. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_AUTO" class="headerlink"><i class="fas fa-link"></i></a>
  292. </h4>
  293. <aside class="phpdocumentor-element-found-in">
  294. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  295. :
  296. <span class="phpdocumentor-element-found-in__line">33</span>
  297. </aside>
  298. <code class="phpdocumentor-signature phpdocumentor-code ">
  299. <span class="phpdocumentor-signature__visibility">public</span>
  300. <span class="phpdocumentor-signature__type">int</span>
  301. <span class="phpdocumentor-signature__name">AUTO</span>
  302. = <span class="phpdocumentor-signature__default-value">-1</span>
  303. </code>
  304. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  305. Tags
  306. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  307. </h5>
  308. <dl class="phpdocumentor-tag-list">
  309. <dt class="phpdocumentor-tag-list__entry">
  310. <span class="phpdocumentor-tag__name">see</span>
  311. </dt>
  312. <dd class="phpdocumentor-tag-list__definition">
  313. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QROptionsTrait.html#property_maskPattern"><abbr title="\chillerlan\QRCode\QROptionsTrait::$maskPattern">QROptionsTrait::$maskPattern</abbr></a></span>
  314. </dd>
  315. </dl>
  316. </article>
  317. <article class="phpdocumentor-element -constant -public ">
  318. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_000">
  319. PATTERN_000
  320. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_000" class="headerlink"><i class="fas fa-link"></i></a>
  321. </h4>
  322. <aside class="phpdocumentor-element-found-in">
  323. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  324. :
  325. <span class="phpdocumentor-element-found-in__line">35</span>
  326. </aside>
  327. <code class="phpdocumentor-signature phpdocumentor-code ">
  328. <span class="phpdocumentor-signature__visibility">public</span>
  329. <span class="phpdocumentor-signature__type">mixed</span>
  330. <span class="phpdocumentor-signature__name">PATTERN_000</span>
  331. = <span class="phpdocumentor-signature__default-value">0b0</span>
  332. </code>
  333. <section class="phpdocumentor-description"></section>
  334. <section class="phpdocumentor-description"></section>
  335. </article>
  336. <article class="phpdocumentor-element -constant -public ">
  337. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_001">
  338. PATTERN_001
  339. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_001" class="headerlink"><i class="fas fa-link"></i></a>
  340. </h4>
  341. <aside class="phpdocumentor-element-found-in">
  342. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  343. :
  344. <span class="phpdocumentor-element-found-in__line">36</span>
  345. </aside>
  346. <code class="phpdocumentor-signature phpdocumentor-code ">
  347. <span class="phpdocumentor-signature__visibility">public</span>
  348. <span class="phpdocumentor-signature__type">mixed</span>
  349. <span class="phpdocumentor-signature__name">PATTERN_001</span>
  350. = <span class="phpdocumentor-signature__default-value">0b1</span>
  351. </code>
  352. <section class="phpdocumentor-description"></section>
  353. <section class="phpdocumentor-description"></section>
  354. </article>
  355. <article class="phpdocumentor-element -constant -public ">
  356. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_010">
  357. PATTERN_010
  358. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_010" class="headerlink"><i class="fas fa-link"></i></a>
  359. </h4>
  360. <aside class="phpdocumentor-element-found-in">
  361. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  362. :
  363. <span class="phpdocumentor-element-found-in__line">37</span>
  364. </aside>
  365. <code class="phpdocumentor-signature phpdocumentor-code ">
  366. <span class="phpdocumentor-signature__visibility">public</span>
  367. <span class="phpdocumentor-signature__type">mixed</span>
  368. <span class="phpdocumentor-signature__name">PATTERN_010</span>
  369. = <span class="phpdocumentor-signature__default-value">0b10</span>
  370. </code>
  371. <section class="phpdocumentor-description"></section>
  372. <section class="phpdocumentor-description"></section>
  373. </article>
  374. <article class="phpdocumentor-element -constant -public ">
  375. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_011">
  376. PATTERN_011
  377. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_011" class="headerlink"><i class="fas fa-link"></i></a>
  378. </h4>
  379. <aside class="phpdocumentor-element-found-in">
  380. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  381. :
  382. <span class="phpdocumentor-element-found-in__line">38</span>
  383. </aside>
  384. <code class="phpdocumentor-signature phpdocumentor-code ">
  385. <span class="phpdocumentor-signature__visibility">public</span>
  386. <span class="phpdocumentor-signature__type">mixed</span>
  387. <span class="phpdocumentor-signature__name">PATTERN_011</span>
  388. = <span class="phpdocumentor-signature__default-value">0b11</span>
  389. </code>
  390. <section class="phpdocumentor-description"></section>
  391. <section class="phpdocumentor-description"></section>
  392. </article>
  393. <article class="phpdocumentor-element -constant -public ">
  394. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_100">
  395. PATTERN_100
  396. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_100" class="headerlink"><i class="fas fa-link"></i></a>
  397. </h4>
  398. <aside class="phpdocumentor-element-found-in">
  399. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  400. :
  401. <span class="phpdocumentor-element-found-in__line">39</span>
  402. </aside>
  403. <code class="phpdocumentor-signature phpdocumentor-code ">
  404. <span class="phpdocumentor-signature__visibility">public</span>
  405. <span class="phpdocumentor-signature__type">mixed</span>
  406. <span class="phpdocumentor-signature__name">PATTERN_100</span>
  407. = <span class="phpdocumentor-signature__default-value">0b100</span>
  408. </code>
  409. <section class="phpdocumentor-description"></section>
  410. <section class="phpdocumentor-description"></section>
  411. </article>
  412. <article class="phpdocumentor-element -constant -public ">
  413. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_101">
  414. PATTERN_101
  415. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_101" class="headerlink"><i class="fas fa-link"></i></a>
  416. </h4>
  417. <aside class="phpdocumentor-element-found-in">
  418. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  419. :
  420. <span class="phpdocumentor-element-found-in__line">40</span>
  421. </aside>
  422. <code class="phpdocumentor-signature phpdocumentor-code ">
  423. <span class="phpdocumentor-signature__visibility">public</span>
  424. <span class="phpdocumentor-signature__type">mixed</span>
  425. <span class="phpdocumentor-signature__name">PATTERN_101</span>
  426. = <span class="phpdocumentor-signature__default-value">0b101</span>
  427. </code>
  428. <section class="phpdocumentor-description"></section>
  429. <section class="phpdocumentor-description"></section>
  430. </article>
  431. <article class="phpdocumentor-element -constant -public ">
  432. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_110">
  433. PATTERN_110
  434. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_110" class="headerlink"><i class="fas fa-link"></i></a>
  435. </h4>
  436. <aside class="phpdocumentor-element-found-in">
  437. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  438. :
  439. <span class="phpdocumentor-element-found-in__line">41</span>
  440. </aside>
  441. <code class="phpdocumentor-signature phpdocumentor-code ">
  442. <span class="phpdocumentor-signature__visibility">public</span>
  443. <span class="phpdocumentor-signature__type">mixed</span>
  444. <span class="phpdocumentor-signature__name">PATTERN_110</span>
  445. = <span class="phpdocumentor-signature__default-value">0b110</span>
  446. </code>
  447. <section class="phpdocumentor-description"></section>
  448. <section class="phpdocumentor-description"></section>
  449. </article>
  450. <article class="phpdocumentor-element -constant -public ">
  451. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_111">
  452. PATTERN_111
  453. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_111" class="headerlink"><i class="fas fa-link"></i></a>
  454. </h4>
  455. <aside class="phpdocumentor-element-found-in">
  456. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  457. :
  458. <span class="phpdocumentor-element-found-in__line">42</span>
  459. </aside>
  460. <code class="phpdocumentor-signature phpdocumentor-code ">
  461. <span class="phpdocumentor-signature__visibility">public</span>
  462. <span class="phpdocumentor-signature__type">mixed</span>
  463. <span class="phpdocumentor-signature__name">PATTERN_111</span>
  464. = <span class="phpdocumentor-signature__default-value">0b111</span>
  465. </code>
  466. <section class="phpdocumentor-description"></section>
  467. <section class="phpdocumentor-description"></section>
  468. </article>
  469. <article class="phpdocumentor-element -constant -public ">
  470. <h4 class="phpdocumentor-element__name" id="constant_PATTERNS">
  471. PATTERNS
  472. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERNS" class="headerlink"><i class="fas fa-link"></i></a>
  473. </h4>
  474. <aside class="phpdocumentor-element-found-in">
  475. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  476. :
  477. <span class="phpdocumentor-element-found-in__line">47</span>
  478. </aside>
  479. <code class="phpdocumentor-signature phpdocumentor-code ">
  480. <span class="phpdocumentor-signature__visibility">public</span>
  481. <span class="phpdocumentor-signature__type">array&lt;string|int, int&gt;</span>
  482. <span class="phpdocumentor-signature__name">PATTERNS</span>
  483. = <span class="phpdocumentor-signature__default-value">[self::PATTERN_000, self::PATTERN_001, self::PATTERN_010, self::PATTERN_011, self::PATTERN_100, self::PATTERN_101, self::PATTERN_110, self::PATTERN_111]</span>
  484. </code>
  485. </article>
  486. </section>
  487. <section class="phpdocumentor-properties">
  488. <h3 class="phpdocumentor-elements__header" id="properties">
  489. Properties
  490. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  491. </h3>
  492. <article
  493. class="
  494. phpdocumentor-element
  495. -property
  496. -private
  497. "
  498. >
  499. <h4 class="phpdocumentor-element__name" id="property_maskPattern">
  500. $maskPattern
  501. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#property_maskPattern" class="headerlink"><i class="fas fa-link"></i></a>
  502. <span class="phpdocumentor-element__modifiers">
  503. </span>
  504. </h4>
  505. <aside class="phpdocumentor-element-found-in">
  506. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  507. :
  508. <span class="phpdocumentor-element-found-in__line">61</span>
  509. </aside>
  510. <p class="phpdocumentor-summary">The current mask pattern value (0-7)</p>
  511. <code class="phpdocumentor-code phpdocumentor-signature ">
  512. <span class="phpdocumentor-signature__visibility">private</span>
  513. <span class="phpdocumentor-signature__type">int</span>
  514. <span class="phpdocumentor-signature__name">$maskPattern</span>
  515. </code>
  516. <section class="phpdocumentor-description"></section>
  517. </article>
  518. </section>
  519. <section class="phpdocumentor-methods">
  520. <h3 class="phpdocumentor-elements__header" id="methods">
  521. Methods
  522. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  523. </h3>
  524. <article
  525. class="phpdocumentor-element
  526. -method
  527. -public
  528. "
  529. >
  530. <h4 class="phpdocumentor-element__name" id="method___construct">
  531. __construct()
  532. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  533. </h4>
  534. <aside class="phpdocumentor-element-found-in">
  535. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  536. :
  537. <span class="phpdocumentor-element-found-in__line">68</span>
  538. </aside>
  539. <p class="phpdocumentor-summary">MaskPattern constructor.</p>
  540. <code class="phpdocumentor-code phpdocumentor-signature ">
  541. <span class="phpdocumentor-signature__visibility">public</span>
  542. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$maskPattern</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  543. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  544. <dl class="phpdocumentor-argument-list">
  545. <dt class="phpdocumentor-argument-list__entry">
  546. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  547. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  548. </dt>
  549. <dd class="phpdocumentor-argument-list__definition">
  550. <section class="phpdocumentor-description"></section>
  551. </dd>
  552. </dl>
  553. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  554. Tags
  555. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  556. </h5>
  557. <dl class="phpdocumentor-tag-list">
  558. <dt class="phpdocumentor-tag-list__entry">
  559. <span class="phpdocumentor-tag__name">throws</span>
  560. </dt>
  561. <dd class="phpdocumentor-tag-list__definition">
  562. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  563. </dd>
  564. </dl>
  565. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  566. <span class="phpdocumentor-signature__response_type">mixed</span>
  567. &mdash;
  568. </article>
  569. <article
  570. class="phpdocumentor-element
  571. -method
  572. -public
  573. -static "
  574. >
  575. <h4 class="phpdocumentor-element__name" id="method_getBestPattern">
  576. getBestPattern()
  577. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getBestPattern" class="headerlink"><i class="fas fa-link"></i></a>
  578. </h4>
  579. <aside class="phpdocumentor-element-found-in">
  580. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  581. :
  582. <span class="phpdocumentor-element-found-in__line">115</span>
  583. </aside>
  584. <p class="phpdocumentor-summary">Evaluates the matrix of the given data interface and returns a new mask pattern instance for the best result</p>
  585. <code class="phpdocumentor-code phpdocumentor-signature ">
  586. <span class="phpdocumentor-signature__visibility">public</span>
  587. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getBestPattern</span><span>(</span><span class="phpdocumentor-signature__argument"><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">$QRMatrix</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
  588. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  589. <dl class="phpdocumentor-argument-list">
  590. <dt class="phpdocumentor-argument-list__entry">
  591. <span class="phpdocumentor-signature__argument__name">$QRMatrix</span>
  592. : <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>
  593. </dt>
  594. <dd class="phpdocumentor-argument-list__definition">
  595. <section class="phpdocumentor-description"></section>
  596. </dd>
  597. </dl>
  598. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  599. <span class="phpdocumentor-signature__response_type">self</span>
  600. &mdash;
  601. </article>
  602. <article
  603. class="phpdocumentor-element
  604. -method
  605. -public
  606. "
  607. >
  608. <h4 class="phpdocumentor-element__name" id="method_getMask">
  609. getMask()
  610. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getMask" class="headerlink"><i class="fas fa-link"></i></a>
  611. </h4>
  612. <aside class="phpdocumentor-element-found-in">
  613. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  614. :
  615. <span class="phpdocumentor-element-found-in__line">98</span>
  616. </aside>
  617. <p class="phpdocumentor-summary">Returns a closure that applies the mask for the chosen mask pattern.</p>
  618. <code class="phpdocumentor-code phpdocumentor-signature ">
  619. <span class="phpdocumentor-signature__visibility">public</span>
  620. <span class="phpdocumentor-signature__name">getMask</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\Closure">Closure</abbr></span></code>
  621. <section class="phpdocumentor-description"><p>Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations
  622. of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix,
  623. including areas used for finder patterns, timing patterns, etc. These areas should be unused
  624. after the point they are unmasked anyway.</p>
  625. <p>Note that the diagram in section 6.8.1 is misleading since it indicates that $i is column position
  626. and $j is row position. In fact, as the text says, $i is row position and $j is column position.</p>
  627. </section>
  628. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  629. Tags
  630. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  631. </h5>
  632. <dl class="phpdocumentor-tag-list">
  633. <dt class="phpdocumentor-tag-list__entry">
  634. <span class="phpdocumentor-tag__name">see</span>
  635. </dt>
  636. <dd class="phpdocumentor-tag-list__definition">
  637. <span class="phpdocumentor-tag-link"><a href="https://www.thonky.com/qr-code-tutorial/mask-patterns"><abbr title="https://www.thonky.com/qr-code-tutorial/mask-patterns">https://www.thonky.com/qr-code-tutorial/mask-patterns</abbr></a></span>
  638. </dd>
  639. <dt class="phpdocumentor-tag-list__entry">
  640. <span class="phpdocumentor-tag__name">see</span>
  641. </dt>
  642. <dd class="phpdocumentor-tag-list__definition">
  643. <span class="phpdocumentor-tag-link"><a href="https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/decoder/DataMask.java#L32-L117"><abbr title="https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/decoder/DataMask.java#L32-L117">https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/decoder/DataMask.java#L32-L117</abbr></a></span>
  644. </dd>
  645. </dl>
  646. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  647. <span class="phpdocumentor-signature__response_type"><abbr title="\Closure">Closure</abbr></span>
  648. &mdash;
  649. </article>
  650. <article
  651. class="phpdocumentor-element
  652. -method
  653. -public
  654. "
  655. >
  656. <h4 class="phpdocumentor-element__name" id="method_getPattern">
  657. getPattern()
  658. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getPattern" class="headerlink"><i class="fas fa-link"></i></a>
  659. </h4>
  660. <aside class="phpdocumentor-element-found-in">
  661. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  662. :
  663. <span class="phpdocumentor-element-found-in__line">80</span>
  664. </aside>
  665. <p class="phpdocumentor-summary">Returns the current mask pattern</p>
  666. <code class="phpdocumentor-code phpdocumentor-signature ">
  667. <span class="phpdocumentor-signature__visibility">public</span>
  668. <span class="phpdocumentor-signature__name">getPattern</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  669. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  670. <span class="phpdocumentor-signature__response_type">int</span>
  671. &mdash;
  672. </article>
  673. <article
  674. class="phpdocumentor-element
  675. -method
  676. -public
  677. -static "
  678. >
  679. <h4 class="phpdocumentor-element__name" id="method_testRule1">
  680. testRule1()
  681. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule1" class="headerlink"><i class="fas fa-link"></i></a>
  682. </h4>
  683. <aside class="phpdocumentor-element-found-in">
  684. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  685. :
  686. <span class="phpdocumentor-element-found-in__line">137</span>
  687. </aside>
  688. <p class="phpdocumentor-summary">Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and
  689. give penalty to them. Example: 00000 or 11111.</p>
  690. <code class="phpdocumentor-code phpdocumentor-signature ">
  691. <span class="phpdocumentor-signature__visibility">public</span>
  692. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">testRule1</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</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">$height</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">$width</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  693. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  694. <dl class="phpdocumentor-argument-list">
  695. <dt class="phpdocumentor-argument-list__entry">
  696. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  697. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  698. </dt>
  699. <dd class="phpdocumentor-argument-list__definition">
  700. <section class="phpdocumentor-description"></section>
  701. </dd>
  702. <dt class="phpdocumentor-argument-list__entry">
  703. <span class="phpdocumentor-signature__argument__name">$height</span>
  704. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  705. </dt>
  706. <dd class="phpdocumentor-argument-list__definition">
  707. <section class="phpdocumentor-description"></section>
  708. </dd>
  709. <dt class="phpdocumentor-argument-list__entry">
  710. <span class="phpdocumentor-signature__argument__name">$width</span>
  711. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  712. </dt>
  713. <dd class="phpdocumentor-argument-list__definition">
  714. <section class="phpdocumentor-description"></section>
  715. </dd>
  716. </dl>
  717. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  718. <span class="phpdocumentor-signature__response_type">int</span>
  719. &mdash;
  720. </article>
  721. <article
  722. class="phpdocumentor-element
  723. -method
  724. -public
  725. -static "
  726. >
  727. <h4 class="phpdocumentor-element__name" id="method_testRule2">
  728. testRule2()
  729. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule2" class="headerlink"><i class="fas fa-link"></i></a>
  730. </h4>
  731. <aside class="phpdocumentor-element-found-in">
  732. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  733. :
  734. <span class="phpdocumentor-element-found-in__line">182</span>
  735. </aside>
  736. <p class="phpdocumentor-summary">Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give
  737. penalty to them. This is actually equivalent to the spec&#039;s rule, which is to find MxN blocks and give a
  738. penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block.</p>
  739. <code class="phpdocumentor-code phpdocumentor-signature ">
  740. <span class="phpdocumentor-signature__visibility">public</span>
  741. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">testRule2</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</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">$height</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">$width</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  742. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  743. <dl class="phpdocumentor-argument-list">
  744. <dt class="phpdocumentor-argument-list__entry">
  745. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  746. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  747. </dt>
  748. <dd class="phpdocumentor-argument-list__definition">
  749. <section class="phpdocumentor-description"></section>
  750. </dd>
  751. <dt class="phpdocumentor-argument-list__entry">
  752. <span class="phpdocumentor-signature__argument__name">$height</span>
  753. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  754. </dt>
  755. <dd class="phpdocumentor-argument-list__definition">
  756. <section class="phpdocumentor-description"></section>
  757. </dd>
  758. <dt class="phpdocumentor-argument-list__entry">
  759. <span class="phpdocumentor-signature__argument__name">$width</span>
  760. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  761. </dt>
  762. <dd class="phpdocumentor-argument-list__definition">
  763. <section class="phpdocumentor-description"></section>
  764. </dd>
  765. </dl>
  766. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  767. <span class="phpdocumentor-signature__response_type">int</span>
  768. &mdash;
  769. </article>
  770. <article
  771. class="phpdocumentor-element
  772. -method
  773. -public
  774. -static "
  775. >
  776. <h4 class="phpdocumentor-element__name" id="method_testRule3">
  777. testRule3()
  778. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule3" class="headerlink"><i class="fas fa-link"></i></a>
  779. </h4>
  780. <aside class="phpdocumentor-element-found-in">
  781. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  782. :
  783. <span class="phpdocumentor-element-found-in__line">215</span>
  784. </aside>
  785. <p class="phpdocumentor-summary">Apply mask penalty rule 3 and return the penalty. Find consecutive runs of 1:1:3:1:1:4
  786. starting with black, or 4:1:1:3:1:1 starting with white, and give penalty to them. If we
  787. find patterns like 000010111010000, we give penalty once.</p>
  788. <code class="phpdocumentor-code phpdocumentor-signature ">
  789. <span class="phpdocumentor-signature__visibility">public</span>
  790. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">testRule3</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</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">$height</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">$width</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  791. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  792. <dl class="phpdocumentor-argument-list">
  793. <dt class="phpdocumentor-argument-list__entry">
  794. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  795. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  796. </dt>
  797. <dd class="phpdocumentor-argument-list__definition">
  798. <section class="phpdocumentor-description"></section>
  799. </dd>
  800. <dt class="phpdocumentor-argument-list__entry">
  801. <span class="phpdocumentor-signature__argument__name">$height</span>
  802. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  803. </dt>
  804. <dd class="phpdocumentor-argument-list__definition">
  805. <section class="phpdocumentor-description"></section>
  806. </dd>
  807. <dt class="phpdocumentor-argument-list__entry">
  808. <span class="phpdocumentor-signature__argument__name">$width</span>
  809. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  810. </dt>
  811. <dd class="phpdocumentor-argument-list__definition">
  812. <section class="phpdocumentor-description"></section>
  813. </dd>
  814. </dl>
  815. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  816. <span class="phpdocumentor-signature__response_type">int</span>
  817. &mdash;
  818. </article>
  819. <article
  820. class="phpdocumentor-element
  821. -method
  822. -public
  823. -static "
  824. >
  825. <h4 class="phpdocumentor-element__name" id="method_testRule4">
  826. testRule4()
  827. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_testRule4" class="headerlink"><i class="fas fa-link"></i></a>
  828. </h4>
  829. <aside class="phpdocumentor-element-found-in">
  830. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  831. :
  832. <span class="phpdocumentor-element-found-in__line">301</span>
  833. </aside>
  834. <p class="phpdocumentor-summary">Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give
  835. penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance.</p>
  836. <code class="phpdocumentor-code phpdocumentor-signature ">
  837. <span class="phpdocumentor-signature__visibility">public</span>
  838. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">testRule4</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</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">$height</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">$width</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  839. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  840. <dl class="phpdocumentor-argument-list">
  841. <dt class="phpdocumentor-argument-list__entry">
  842. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  843. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  844. </dt>
  845. <dd class="phpdocumentor-argument-list__definition">
  846. <section class="phpdocumentor-description"></section>
  847. </dd>
  848. <dt class="phpdocumentor-argument-list__entry">
  849. <span class="phpdocumentor-signature__argument__name">$height</span>
  850. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  851. </dt>
  852. <dd class="phpdocumentor-argument-list__definition">
  853. <section class="phpdocumentor-description"></section>
  854. </dd>
  855. <dt class="phpdocumentor-argument-list__entry">
  856. <span class="phpdocumentor-signature__argument__name">$width</span>
  857. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  858. </dt>
  859. <dd class="phpdocumentor-argument-list__definition">
  860. <section class="phpdocumentor-description"></section>
  861. </dd>
  862. </dl>
  863. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  864. <span class="phpdocumentor-signature__response_type">int</span>
  865. &mdash;
  866. </article>
  867. <article
  868. class="phpdocumentor-element
  869. -method
  870. -private
  871. -static "
  872. >
  873. <h4 class="phpdocumentor-element__name" id="method_applyRule1">
  874. applyRule1()
  875. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_applyRule1" class="headerlink"><i class="fas fa-link"></i></a>
  876. </h4>
  877. <aside class="phpdocumentor-element-found-in">
  878. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  879. :
  880. <span class="phpdocumentor-element-found-in__line">144</span>
  881. </aside>
  882. <code class="phpdocumentor-code phpdocumentor-signature ">
  883. <span class="phpdocumentor-signature__visibility">private</span>
  884. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">applyRule1</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</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">$height</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">$width</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$isHorizontal</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  885. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  886. <dl class="phpdocumentor-argument-list">
  887. <dt class="phpdocumentor-argument-list__entry">
  888. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  889. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  890. </dt>
  891. <dd class="phpdocumentor-argument-list__definition">
  892. <section class="phpdocumentor-description"></section>
  893. </dd>
  894. <dt class="phpdocumentor-argument-list__entry">
  895. <span class="phpdocumentor-signature__argument__name">$height</span>
  896. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  897. </dt>
  898. <dd class="phpdocumentor-argument-list__definition">
  899. <section class="phpdocumentor-description"></section>
  900. </dd>
  901. <dt class="phpdocumentor-argument-list__entry">
  902. <span class="phpdocumentor-signature__argument__name">$width</span>
  903. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  904. </dt>
  905. <dd class="phpdocumentor-argument-list__definition">
  906. <section class="phpdocumentor-description"></section>
  907. </dd>
  908. <dt class="phpdocumentor-argument-list__entry">
  909. <span class="phpdocumentor-signature__argument__name">$isHorizontal</span>
  910. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  911. </dt>
  912. <dd class="phpdocumentor-argument-list__definition">
  913. <section class="phpdocumentor-description"></section>
  914. </dd>
  915. </dl>
  916. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  917. <span class="phpdocumentor-signature__response_type">int</span>
  918. &mdash;
  919. </article>
  920. <article
  921. class="phpdocumentor-element
  922. -method
  923. -private
  924. -static "
  925. >
  926. <h4 class="phpdocumentor-element__name" id="method_isWhiteHorizontal">
  927. isWhiteHorizontal()
  928. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_isWhiteHorizontal" class="headerlink"><i class="fas fa-link"></i></a>
  929. </h4>
  930. <aside class="phpdocumentor-element-found-in">
  931. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  932. :
  933. <span class="phpdocumentor-element-found-in__line">264</span>
  934. </aside>
  935. <code class="phpdocumentor-code phpdocumentor-signature ">
  936. <span class="phpdocumentor-signature__visibility">private</span>
  937. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">isWhiteHorizontal</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$row</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">$width</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">$from</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">$to</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  938. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  939. <dl class="phpdocumentor-argument-list">
  940. <dt class="phpdocumentor-argument-list__entry">
  941. <span class="phpdocumentor-signature__argument__name">$row</span>
  942. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  943. </dt>
  944. <dd class="phpdocumentor-argument-list__definition">
  945. <section class="phpdocumentor-description"></section>
  946. </dd>
  947. <dt class="phpdocumentor-argument-list__entry">
  948. <span class="phpdocumentor-signature__argument__name">$width</span>
  949. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  950. </dt>
  951. <dd class="phpdocumentor-argument-list__definition">
  952. <section class="phpdocumentor-description"></section>
  953. </dd>
  954. <dt class="phpdocumentor-argument-list__entry">
  955. <span class="phpdocumentor-signature__argument__name">$from</span>
  956. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  957. </dt>
  958. <dd class="phpdocumentor-argument-list__definition">
  959. <section class="phpdocumentor-description"></section>
  960. </dd>
  961. <dt class="phpdocumentor-argument-list__entry">
  962. <span class="phpdocumentor-signature__argument__name">$to</span>
  963. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  964. </dt>
  965. <dd class="phpdocumentor-argument-list__definition">
  966. <section class="phpdocumentor-description"></section>
  967. </dd>
  968. </dl>
  969. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  970. <span class="phpdocumentor-signature__response_type">bool</span>
  971. &mdash;
  972. </article>
  973. <article
  974. class="phpdocumentor-element
  975. -method
  976. -private
  977. -static "
  978. >
  979. <h4 class="phpdocumentor-element__name" id="method_isWhiteVertical">
  980. isWhiteVertical()
  981. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_isWhiteVertical" class="headerlink"><i class="fas fa-link"></i></a>
  982. </h4>
  983. <aside class="phpdocumentor-element-found-in">
  984. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/MaskPattern.php"><a href="files/src-common-maskpattern.html"><abbr title="src/Common/MaskPattern.php">MaskPattern.php</abbr></a></abbr>
  985. :
  986. <span class="phpdocumentor-element-found-in__line">282</span>
  987. </aside>
  988. <code class="phpdocumentor-code phpdocumentor-signature ">
  989. <span class="phpdocumentor-signature__visibility">private</span>
  990. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">isWhiteVertical</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</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">$height</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">$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">$from</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">$to</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  991. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  992. <dl class="phpdocumentor-argument-list">
  993. <dt class="phpdocumentor-argument-list__entry">
  994. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  995. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  996. </dt>
  997. <dd class="phpdocumentor-argument-list__definition">
  998. <section class="phpdocumentor-description"></section>
  999. </dd>
  1000. <dt class="phpdocumentor-argument-list__entry">
  1001. <span class="phpdocumentor-signature__argument__name">$height</span>
  1002. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1003. </dt>
  1004. <dd class="phpdocumentor-argument-list__definition">
  1005. <section class="phpdocumentor-description"></section>
  1006. </dd>
  1007. <dt class="phpdocumentor-argument-list__entry">
  1008. <span class="phpdocumentor-signature__argument__name">$x</span>
  1009. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1010. </dt>
  1011. <dd class="phpdocumentor-argument-list__definition">
  1012. <section class="phpdocumentor-description"></section>
  1013. </dd>
  1014. <dt class="phpdocumentor-argument-list__entry">
  1015. <span class="phpdocumentor-signature__argument__name">$from</span>
  1016. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1017. </dt>
  1018. <dd class="phpdocumentor-argument-list__definition">
  1019. <section class="phpdocumentor-description"></section>
  1020. </dd>
  1021. <dt class="phpdocumentor-argument-list__entry">
  1022. <span class="phpdocumentor-signature__argument__name">$to</span>
  1023. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1024. </dt>
  1025. <dd class="phpdocumentor-argument-list__definition">
  1026. <section class="phpdocumentor-description"></section>
  1027. </dd>
  1028. </dl>
  1029. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1030. <span class="phpdocumentor-signature__response_type">bool</span>
  1031. &mdash;
  1032. </article>
  1033. </section>
  1034. <script type="text/javascript">
  1035. function loadExternalCodeSnippets(line) {
  1036. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1037. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  1038. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  1039. var language = 'php';
  1040. var code = document.createElement('code');
  1041. code.className = 'language-' + language;
  1042. pre.textContent = '';
  1043. pre.setAttribute('data-line', line)
  1044. code.textContent = 'Loading…';
  1045. pre.appendChild(code);
  1046. var xhr = new XMLHttpRequest();
  1047. xhr.open('GET', src, true);
  1048. xhr.onreadystatechange = function () {
  1049. if (xhr.readyState == 4) {
  1050. if (xhr.status < 400 && xhr.responseText) {
  1051. code.textContent = xhr.responseText;
  1052. Prism.highlightElement(code);
  1053. }
  1054. else if (xhr.status >= 400) {
  1055. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1056. }
  1057. else {
  1058. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  1059. }
  1060. }
  1061. };
  1062. xhr.send(null);
  1063. });
  1064. }
  1065. var modals = document.querySelectorAll("[data-modal]");
  1066. modals.forEach(function (trigger) {
  1067. trigger.addEventListener("click", function (event) {
  1068. //event.preventDefault();
  1069. const modal = document.getElementById(trigger.dataset.modal);
  1070. modal.classList.add("phpdocumentor-modal__open");
  1071. loadExternalCodeSnippets(trigger.dataset.line)
  1072. const exits = modal.querySelectorAll("[data-exit-button]");
  1073. exits.forEach(function (exit) {
  1074. exit.addEventListener("click", function (event) {
  1075. event.preventDefault();
  1076. modal.classList.remove("phpdocumentor-modal__open");
  1077. });
  1078. });
  1079. });
  1080. });
  1081. </script>
  1082. </article>
  1083. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1084. <section class="phpdocumentor-search-results__dialog">
  1085. <header class="phpdocumentor-search-results__header">
  1086. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1087. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1088. </header>
  1089. <section class="phpdocumentor-search-results__body">
  1090. <ul class="phpdocumentor-search-results__entries"></ul>
  1091. </section>
  1092. </section>
  1093. </section>
  1094. </div>
  1095. </div>
  1096. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1097. </main>
  1098. <script>
  1099. cssVars({});
  1100. </script>
  1101. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1102. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1103. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1104. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1105. </body>
  1106. </html>