chillerlan-QRCode-Common-MaskPattern.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  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-common.html">Common</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. MaskPattern
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <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>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">19</span>
  100. </aside>
  101. <p class="phpdocumentor-summary">ISO/IEC 18004:2000 Section 8.8.1</p>
  102. <h3 id="toc">
  103. Table of Contents
  104. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  105. </h3>
  106. <dl class="phpdocumentor-table-of-contents">
  107. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  108. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_000">PATTERN_000</a>
  109. <span>
  110. &nbsp;= 0b0 </span>
  111. </dt>
  112. <dd></dd>
  113. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  114. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_001">PATTERN_001</a>
  115. <span>
  116. &nbsp;= 0b1 </span>
  117. </dt>
  118. <dd></dd>
  119. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  120. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_010">PATTERN_010</a>
  121. <span>
  122. &nbsp;= 0b10 </span>
  123. </dt>
  124. <dd></dd>
  125. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  126. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_011">PATTERN_011</a>
  127. <span>
  128. &nbsp;= 0b11 </span>
  129. </dt>
  130. <dd></dd>
  131. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  132. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_100">PATTERN_100</a>
  133. <span>
  134. &nbsp;= 0b100 </span>
  135. </dt>
  136. <dd></dd>
  137. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  138. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_101">PATTERN_101</a>
  139. <span>
  140. &nbsp;= 0b101 </span>
  141. </dt>
  142. <dd></dd>
  143. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  144. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_110">PATTERN_110</a>
  145. <span>
  146. &nbsp;= 0b110 </span>
  147. </dt>
  148. <dd></dd>
  149. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  150. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_111">PATTERN_111</a>
  151. <span>
  152. &nbsp;= 0b111 </span>
  153. </dt>
  154. <dd></dd>
  155. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  156. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERNS">PATTERNS</a>
  157. <span>
  158. &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>
  159. </dt>
  160. <dd></dd>
  161. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  162. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#property_maskPattern">$maskPattern</a>
  163. <span>
  164. &nbsp;: int </span>
  165. </dt>
  166. <dd>The current mask pattern value (0-7)</dd>
  167. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  168. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method___construct">__construct()</a>
  169. <span>
  170. &nbsp;: mixed </span>
  171. </dt>
  172. <dd>MaskPattern constructor.</dd>
  173. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  174. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getMask">getMask()</a>
  175. <span>
  176. &nbsp;: <abbr title="\Closure">Closure</abbr> </span>
  177. </dt>
  178. <dd>Returns a closure that applies the mask for the chosen mask pattern.</dd>
  179. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  180. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getPattern">getPattern()</a>
  181. <span>
  182. &nbsp;: int </span>
  183. </dt>
  184. <dd>Returns the current mask pattern</dd>
  185. </dl>
  186. <section class="phpdocumentor-constants">
  187. <h3 class="phpdocumentor-elements__header" id="constants">
  188. Constants
  189. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  190. </h3>
  191. <article class="phpdocumentor-element -constant -public ">
  192. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_000">
  193. PATTERN_000
  194. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_000" class="headerlink"><i class="fas fa-link"></i></a>
  195. </h4>
  196. <aside class="phpdocumentor-element-found-in">
  197. <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>
  198. :
  199. <span class="phpdocumentor-element-found-in__line">21</span>
  200. </aside>
  201. <code class="phpdocumentor-signature phpdocumentor-code ">
  202. <span class="phpdocumentor-signature__visibility">public</span>
  203. <span class="phpdocumentor-signature__type">mixed</span>
  204. <span class="phpdocumentor-signature__name">PATTERN_000</span>
  205. = <span class="phpdocumentor-signature__default-value">0b0</span>
  206. </code>
  207. <section class="phpdocumentor-description"></section>
  208. <section class="phpdocumentor-description"></section>
  209. </article>
  210. <article class="phpdocumentor-element -constant -public ">
  211. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_001">
  212. PATTERN_001
  213. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_001" class="headerlink"><i class="fas fa-link"></i></a>
  214. </h4>
  215. <aside class="phpdocumentor-element-found-in">
  216. <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>
  217. :
  218. <span class="phpdocumentor-element-found-in__line">22</span>
  219. </aside>
  220. <code class="phpdocumentor-signature phpdocumentor-code ">
  221. <span class="phpdocumentor-signature__visibility">public</span>
  222. <span class="phpdocumentor-signature__type">mixed</span>
  223. <span class="phpdocumentor-signature__name">PATTERN_001</span>
  224. = <span class="phpdocumentor-signature__default-value">0b1</span>
  225. </code>
  226. <section class="phpdocumentor-description"></section>
  227. <section class="phpdocumentor-description"></section>
  228. </article>
  229. <article class="phpdocumentor-element -constant -public ">
  230. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_010">
  231. PATTERN_010
  232. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_010" class="headerlink"><i class="fas fa-link"></i></a>
  233. </h4>
  234. <aside class="phpdocumentor-element-found-in">
  235. <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>
  236. :
  237. <span class="phpdocumentor-element-found-in__line">23</span>
  238. </aside>
  239. <code class="phpdocumentor-signature phpdocumentor-code ">
  240. <span class="phpdocumentor-signature__visibility">public</span>
  241. <span class="phpdocumentor-signature__type">mixed</span>
  242. <span class="phpdocumentor-signature__name">PATTERN_010</span>
  243. = <span class="phpdocumentor-signature__default-value">0b10</span>
  244. </code>
  245. <section class="phpdocumentor-description"></section>
  246. <section class="phpdocumentor-description"></section>
  247. </article>
  248. <article class="phpdocumentor-element -constant -public ">
  249. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_011">
  250. PATTERN_011
  251. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_011" class="headerlink"><i class="fas fa-link"></i></a>
  252. </h4>
  253. <aside class="phpdocumentor-element-found-in">
  254. <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>
  255. :
  256. <span class="phpdocumentor-element-found-in__line">24</span>
  257. </aside>
  258. <code class="phpdocumentor-signature phpdocumentor-code ">
  259. <span class="phpdocumentor-signature__visibility">public</span>
  260. <span class="phpdocumentor-signature__type">mixed</span>
  261. <span class="phpdocumentor-signature__name">PATTERN_011</span>
  262. = <span class="phpdocumentor-signature__default-value">0b11</span>
  263. </code>
  264. <section class="phpdocumentor-description"></section>
  265. <section class="phpdocumentor-description"></section>
  266. </article>
  267. <article class="phpdocumentor-element -constant -public ">
  268. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_100">
  269. PATTERN_100
  270. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_100" class="headerlink"><i class="fas fa-link"></i></a>
  271. </h4>
  272. <aside class="phpdocumentor-element-found-in">
  273. <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>
  274. :
  275. <span class="phpdocumentor-element-found-in__line">25</span>
  276. </aside>
  277. <code class="phpdocumentor-signature phpdocumentor-code ">
  278. <span class="phpdocumentor-signature__visibility">public</span>
  279. <span class="phpdocumentor-signature__type">mixed</span>
  280. <span class="phpdocumentor-signature__name">PATTERN_100</span>
  281. = <span class="phpdocumentor-signature__default-value">0b100</span>
  282. </code>
  283. <section class="phpdocumentor-description"></section>
  284. <section class="phpdocumentor-description"></section>
  285. </article>
  286. <article class="phpdocumentor-element -constant -public ">
  287. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_101">
  288. PATTERN_101
  289. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_101" class="headerlink"><i class="fas fa-link"></i></a>
  290. </h4>
  291. <aside class="phpdocumentor-element-found-in">
  292. <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>
  293. :
  294. <span class="phpdocumentor-element-found-in__line">26</span>
  295. </aside>
  296. <code class="phpdocumentor-signature phpdocumentor-code ">
  297. <span class="phpdocumentor-signature__visibility">public</span>
  298. <span class="phpdocumentor-signature__type">mixed</span>
  299. <span class="phpdocumentor-signature__name">PATTERN_101</span>
  300. = <span class="phpdocumentor-signature__default-value">0b101</span>
  301. </code>
  302. <section class="phpdocumentor-description"></section>
  303. <section class="phpdocumentor-description"></section>
  304. </article>
  305. <article class="phpdocumentor-element -constant -public ">
  306. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_110">
  307. PATTERN_110
  308. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_110" class="headerlink"><i class="fas fa-link"></i></a>
  309. </h4>
  310. <aside class="phpdocumentor-element-found-in">
  311. <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>
  312. :
  313. <span class="phpdocumentor-element-found-in__line">27</span>
  314. </aside>
  315. <code class="phpdocumentor-signature phpdocumentor-code ">
  316. <span class="phpdocumentor-signature__visibility">public</span>
  317. <span class="phpdocumentor-signature__type">mixed</span>
  318. <span class="phpdocumentor-signature__name">PATTERN_110</span>
  319. = <span class="phpdocumentor-signature__default-value">0b110</span>
  320. </code>
  321. <section class="phpdocumentor-description"></section>
  322. <section class="phpdocumentor-description"></section>
  323. </article>
  324. <article class="phpdocumentor-element -constant -public ">
  325. <h4 class="phpdocumentor-element__name" id="constant_PATTERN_111">
  326. PATTERN_111
  327. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERN_111" class="headerlink"><i class="fas fa-link"></i></a>
  328. </h4>
  329. <aside class="phpdocumentor-element-found-in">
  330. <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>
  331. :
  332. <span class="phpdocumentor-element-found-in__line">28</span>
  333. </aside>
  334. <code class="phpdocumentor-signature phpdocumentor-code ">
  335. <span class="phpdocumentor-signature__visibility">public</span>
  336. <span class="phpdocumentor-signature__type">mixed</span>
  337. <span class="phpdocumentor-signature__name">PATTERN_111</span>
  338. = <span class="phpdocumentor-signature__default-value">0b111</span>
  339. </code>
  340. <section class="phpdocumentor-description"></section>
  341. <section class="phpdocumentor-description"></section>
  342. </article>
  343. <article class="phpdocumentor-element -constant -public ">
  344. <h4 class="phpdocumentor-element__name" id="constant_PATTERNS">
  345. PATTERNS
  346. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#constant_PATTERNS" class="headerlink"><i class="fas fa-link"></i></a>
  347. </h4>
  348. <aside class="phpdocumentor-element-found-in">
  349. <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>
  350. :
  351. <span class="phpdocumentor-element-found-in__line">33</span>
  352. </aside>
  353. <code class="phpdocumentor-signature phpdocumentor-code ">
  354. <span class="phpdocumentor-signature__visibility">public</span>
  355. <span class="phpdocumentor-signature__type">array&lt;string|int, int&gt;</span>
  356. <span class="phpdocumentor-signature__name">PATTERNS</span>
  357. = <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>
  358. </code>
  359. </article>
  360. </section>
  361. <section class="phpdocumentor-properties">
  362. <h3 class="phpdocumentor-elements__header" id="properties">
  363. Properties
  364. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  365. </h3>
  366. <article
  367. class="
  368. phpdocumentor-element
  369. -property
  370. -private
  371. "
  372. >
  373. <h4 class="phpdocumentor-element__name" id="property_maskPattern">
  374. $maskPattern
  375. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#property_maskPattern" class="headerlink"><i class="fas fa-link"></i></a>
  376. <span class="phpdocumentor-element__modifiers">
  377. </span>
  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">47</span>
  383. </aside>
  384. <p class="phpdocumentor-summary">The current mask pattern value (0-7)</p>
  385. <code class="phpdocumentor-code phpdocumentor-signature ">
  386. <span class="phpdocumentor-signature__visibility">private</span>
  387. <span class="phpdocumentor-signature__type">int</span>
  388. <span class="phpdocumentor-signature__name">$maskPattern</span>
  389. </code>
  390. <section class="phpdocumentor-description"></section>
  391. </article>
  392. </section>
  393. <section class="phpdocumentor-methods">
  394. <h3 class="phpdocumentor-elements__header" id="methods">
  395. Methods
  396. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  397. </h3>
  398. <article
  399. class="phpdocumentor-element
  400. -method
  401. -public
  402. "
  403. >
  404. <h4 class="phpdocumentor-element__name" id="method___construct">
  405. __construct()
  406. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  407. </h4>
  408. <aside class="phpdocumentor-element-found-in">
  409. <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>
  410. :
  411. <span class="phpdocumentor-element-found-in__line">54</span>
  412. </aside>
  413. <p class="phpdocumentor-summary">MaskPattern constructor.</p>
  414. <code class="phpdocumentor-code phpdocumentor-signature ">
  415. <span class="phpdocumentor-signature__visibility">public</span>
  416. <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>
  417. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  418. <dl class="phpdocumentor-argument-list">
  419. <dt class="phpdocumentor-argument-list__entry">
  420. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  421. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  422. </dt>
  423. <dd class="phpdocumentor-argument-list__definition">
  424. <section class="phpdocumentor-description"></section>
  425. </dd>
  426. </dl>
  427. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  428. Tags
  429. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  430. </h5>
  431. <dl class="phpdocumentor-tag-list">
  432. <dt class="phpdocumentor-tag-list__entry">
  433. <span class="phpdocumentor-tag__name">throws</span>
  434. </dt>
  435. <dd class="phpdocumentor-tag-list__definition">
  436. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  437. </dd>
  438. </dl>
  439. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  440. <span class="phpdocumentor-signature__response_type">mixed</span>
  441. &mdash;
  442. </article>
  443. <article
  444. class="phpdocumentor-element
  445. -method
  446. -public
  447. "
  448. >
  449. <h4 class="phpdocumentor-element__name" id="method_getMask">
  450. getMask()
  451. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getMask" class="headerlink"><i class="fas fa-link"></i></a>
  452. </h4>
  453. <aside class="phpdocumentor-element-found-in">
  454. <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>
  455. :
  456. <span class="phpdocumentor-element-found-in__line">84</span>
  457. </aside>
  458. <p class="phpdocumentor-summary">Returns a closure that applies the mask for the chosen mask pattern.</p>
  459. <code class="phpdocumentor-code phpdocumentor-signature ">
  460. <span class="phpdocumentor-signature__visibility">public</span>
  461. <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>
  462. <section class="phpdocumentor-description"><p>Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations
  463. of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix,
  464. including areas used for finder patterns, timing patterns, etc. These areas should be unused
  465. after the point they are unmasked anyway.</p>
  466. <p>Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position
  467. and j is row position. In fact, as the text says, i is row position and j is column position.</p>
  468. </section>
  469. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  470. Tags
  471. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  472. </h5>
  473. <dl class="phpdocumentor-tag-list">
  474. <dt class="phpdocumentor-tag-list__entry">
  475. <span class="phpdocumentor-tag__name">see</span>
  476. </dt>
  477. <dd class="phpdocumentor-tag-list__definition">
  478. <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>
  479. </dd>
  480. <dt class="phpdocumentor-tag-list__entry">
  481. <span class="phpdocumentor-tag__name">see</span>
  482. </dt>
  483. <dd class="phpdocumentor-tag-list__definition">
  484. <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>
  485. </dd>
  486. </dl>
  487. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  488. <span class="phpdocumentor-signature__response_type"><abbr title="\Closure">Closure</abbr></span>
  489. &mdash;
  490. </article>
  491. <article
  492. class="phpdocumentor-element
  493. -method
  494. -public
  495. "
  496. >
  497. <h4 class="phpdocumentor-element__name" id="method_getPattern">
  498. getPattern()
  499. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#method_getPattern" class="headerlink"><i class="fas fa-link"></i></a>
  500. </h4>
  501. <aside class="phpdocumentor-element-found-in">
  502. <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>
  503. :
  504. <span class="phpdocumentor-element-found-in__line">66</span>
  505. </aside>
  506. <p class="phpdocumentor-summary">Returns the current mask pattern</p>
  507. <code class="phpdocumentor-code phpdocumentor-signature ">
  508. <span class="phpdocumentor-signature__visibility">public</span>
  509. <span class="phpdocumentor-signature__name">getPattern</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  510. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  511. <span class="phpdocumentor-signature__response_type">int</span>
  512. &mdash;
  513. </article>
  514. </section>
  515. <script type="text/javascript">
  516. function loadExternalCodeSnippets(line) {
  517. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  518. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  519. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  520. var language = 'php';
  521. var code = document.createElement('code');
  522. code.className = 'language-' + language;
  523. pre.textContent = '';
  524. pre.setAttribute('data-line', line)
  525. code.textContent = 'Loading…';
  526. pre.appendChild(code);
  527. var xhr = new XMLHttpRequest();
  528. xhr.open('GET', src, true);
  529. xhr.onreadystatechange = function () {
  530. if (xhr.readyState == 4) {
  531. if (xhr.status < 400 && xhr.responseText) {
  532. code.textContent = xhr.responseText;
  533. Prism.highlightElement(code);
  534. }
  535. else if (xhr.status >= 400) {
  536. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  537. }
  538. else {
  539. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  540. }
  541. }
  542. };
  543. xhr.send(null);
  544. });
  545. }
  546. var modals = document.querySelectorAll("[data-modal]");
  547. modals.forEach(function (trigger) {
  548. trigger.addEventListener("click", function (event) {
  549. //event.preventDefault();
  550. const modal = document.getElementById(trigger.dataset.modal);
  551. modal.classList.add("phpdocumentor-modal__open");
  552. loadExternalCodeSnippets(trigger.dataset.line)
  553. const exits = modal.querySelectorAll("[data-exit-button]");
  554. exits.forEach(function (exit) {
  555. exit.addEventListener("click", function (event) {
  556. event.preventDefault();
  557. modal.classList.remove("phpdocumentor-modal__open");
  558. });
  559. });
  560. });
  561. });
  562. </script>
  563. </article>
  564. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  565. <section class="phpdocumentor-search-results__dialog">
  566. <header class="phpdocumentor-search-results__header">
  567. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  568. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  569. </header>
  570. <section class="phpdocumentor-search-results__body">
  571. <ul class="phpdocumentor-search-results__entries"></ul>
  572. </section>
  573. </section>
  574. </section>
  575. </div>
  576. </div>
  577. <a href="classes/chillerlan-QRCode-Common-MaskPattern.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  578. </main>
  579. <script>
  580. cssVars({});
  581. </script>
  582. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  583. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  584. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  585. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  586. </body>
  587. </html>