chillerlan-QRCode-Decoder-Decoder.html 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. <h4 class="phpdocumentor-sidebar__root-namespace">
  82. <a href="namespaces/output.html" class="">Output</a>
  83. </h4>
  84. </section>
  85. <section class="phpdocumentor-sidebar__category">
  86. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  87. <h4 class="phpdocumentor-sidebar__root-namespace">
  88. <a href="packages/Application.html" class="">Application</a>
  89. </h4>
  90. </section>
  91. <section class="phpdocumentor-sidebar__category">
  92. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  93. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  94. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  96. </section>
  97. <section class="phpdocumentor-sidebar__category">
  98. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  100. </section>
  101. </aside>
  102. <div class="phpdocumentor-column -nine phpdocumentor-content">
  103. <section>
  104. <ul class="phpdocumentor-breadcrumbs">
  105. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  106. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  107. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  108. </ul>
  109. <article class="phpdocumentor-element -class">
  110. <h2 class="phpdocumentor-content__title">
  111. Decoder
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">28</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">The main class which implements QR Code decoding -- as opposed to locating and extracting
  128. the QR Code from an image.</p>
  129. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  130. Tags
  131. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  132. </h5>
  133. <dl class="phpdocumentor-tag-list">
  134. <dt class="phpdocumentor-tag-list__entry">
  135. <span class="phpdocumentor-tag__name">author</span>
  136. </dt>
  137. <dd class="phpdocumentor-tag-list__definition">
  138. <section class="phpdocumentor-description"><p>Sean Owen</p>
  139. </section>
  140. </dd>
  141. </dl>
  142. <h3 id="toc">
  143. Table of Contents
  144. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  145. </h3>
  146. <h4 id="toc-properties">
  147. Properties
  148. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  149. </h4>
  150. <dl class="phpdocumentor-table-of-contents">
  151. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  152. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_bitBuffer">$bitBuffer</a>
  153. <span>
  154. &nbsp;: <a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a> </span>
  155. </dt>
  156. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  157. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_eccLevel">$eccLevel</a>
  158. <span>
  159. &nbsp;: <a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a>|null </span>
  160. </dt>
  161. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  162. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_maskPattern">$maskPattern</a>
  163. <span>
  164. &nbsp;: <a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a>|null </span>
  165. </dt>
  166. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  167. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_options">$options</a>
  168. <span>
  169. &nbsp;: <a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>|<abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  170. </dt>
  171. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  172. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_version">$version</a>
  173. <span>
  174. &nbsp;: <a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a>|null </span>
  175. </dt>
  176. </dl>
  177. <h4 id="toc-methods">
  178. Methods
  179. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  180. </h4>
  181. <dl class="phpdocumentor-table-of-contents">
  182. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  183. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method___construct">__construct()</a>
  184. <span>
  185. &nbsp;: mixed </span>
  186. </dt>
  187. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  188. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decode">decode()</a>
  189. <span>
  190. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a> </span>
  191. </dt>
  192. <dd>Decodes a QR Code represented as a BitMatrix.</dd>
  193. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  194. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeAlphanumSegment">decodeAlphanumSegment()</a>
  195. <span>
  196. &nbsp;: string </span>
  197. </dt>
  198. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  199. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeBitStream">decodeBitStream()</a>
  200. <span>
  201. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a> </span>
  202. </dt>
  203. <dd>Decode the contents of that stream of bytes</dd>
  204. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  205. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeMatrix">decodeMatrix()</a>
  206. <span>
  207. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a> </span>
  208. </dt>
  209. </dl>
  210. <section class="phpdocumentor-properties">
  211. <h3 class="phpdocumentor-elements__header" id="properties">
  212. Properties
  213. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  214. </h3>
  215. <article
  216. class="
  217. phpdocumentor-element
  218. -property
  219. -private
  220. "
  221. >
  222. <h4 class="phpdocumentor-element__name" id="property_bitBuffer">
  223. $bitBuffer
  224. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_bitBuffer" class="headerlink"><i class="fas fa-link"></i></a>
  225. <span class="phpdocumentor-element__modifiers">
  226. </span>
  227. </h4>
  228. <aside class="phpdocumentor-element-found-in">
  229. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  230. :
  231. <span class="phpdocumentor-element-found-in__line">37</span>
  232. </aside>
  233. <code class="phpdocumentor-code phpdocumentor-signature ">
  234. <span class="phpdocumentor-signature__visibility">private</span>
  235. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  236. <span class="phpdocumentor-signature__name">$bitBuffer</span>
  237. </code>
  238. </article>
  239. <article
  240. class="
  241. phpdocumentor-element
  242. -property
  243. -private
  244. "
  245. >
  246. <h4 class="phpdocumentor-element__name" id="property_eccLevel">
  247. $eccLevel
  248. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_eccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  249. <span class="phpdocumentor-element__modifiers">
  250. </span>
  251. </h4>
  252. <aside class="phpdocumentor-element-found-in">
  253. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  254. :
  255. <span class="phpdocumentor-element-found-in__line">35</span>
  256. </aside>
  257. <code class="phpdocumentor-code phpdocumentor-signature ">
  258. <span class="phpdocumentor-signature__visibility">private</span>
  259. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a>|null</span>
  260. <span class="phpdocumentor-signature__name">$eccLevel</span>
  261. = <span class="phpdocumentor-signature__default-value">null</span></code>
  262. </article>
  263. <article
  264. class="
  265. phpdocumentor-element
  266. -property
  267. -private
  268. "
  269. >
  270. <h4 class="phpdocumentor-element__name" id="property_maskPattern">
  271. $maskPattern
  272. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_maskPattern" class="headerlink"><i class="fas fa-link"></i></a>
  273. <span class="phpdocumentor-element__modifiers">
  274. </span>
  275. </h4>
  276. <aside class="phpdocumentor-element-found-in">
  277. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  278. :
  279. <span class="phpdocumentor-element-found-in__line">36</span>
  280. </aside>
  281. <code class="phpdocumentor-code phpdocumentor-signature ">
  282. <span class="phpdocumentor-signature__visibility">private</span>
  283. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a>|null</span>
  284. <span class="phpdocumentor-signature__name">$maskPattern</span>
  285. = <span class="phpdocumentor-signature__default-value">null</span></code>
  286. </article>
  287. <article
  288. class="
  289. phpdocumentor-element
  290. -property
  291. -private
  292. "
  293. >
  294. <h4 class="phpdocumentor-element__name" id="property_options">
  295. $options
  296. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  297. <span class="phpdocumentor-element__modifiers">
  298. </span>
  299. </h4>
  300. <aside class="phpdocumentor-element-found-in">
  301. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  302. :
  303. <span class="phpdocumentor-element-found-in__line">33</span>
  304. </aside>
  305. <code class="phpdocumentor-code phpdocumentor-signature ">
  306. <span class="phpdocumentor-signature__visibility">private</span>
  307. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>|<abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  308. <span class="phpdocumentor-signature__name">$options</span>
  309. </code>
  310. </article>
  311. <article
  312. class="
  313. phpdocumentor-element
  314. -property
  315. -private
  316. "
  317. >
  318. <h4 class="phpdocumentor-element__name" id="property_version">
  319. $version
  320. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_version" class="headerlink"><i class="fas fa-link"></i></a>
  321. <span class="phpdocumentor-element__modifiers">
  322. </span>
  323. </h4>
  324. <aside class="phpdocumentor-element-found-in">
  325. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  326. :
  327. <span class="phpdocumentor-element-found-in__line">34</span>
  328. </aside>
  329. <code class="phpdocumentor-code phpdocumentor-signature ">
  330. <span class="phpdocumentor-signature__visibility">private</span>
  331. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a>|null</span>
  332. <span class="phpdocumentor-signature__name">$version</span>
  333. = <span class="phpdocumentor-signature__default-value">null</span></code>
  334. </article>
  335. </section>
  336. <section class="phpdocumentor-methods">
  337. <h3 class="phpdocumentor-elements__header" id="methods">
  338. Methods
  339. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  340. </h3>
  341. <article
  342. class="phpdocumentor-element
  343. -method
  344. -public
  345. "
  346. >
  347. <h4 class="phpdocumentor-element__name" id="method___construct">
  348. __construct()
  349. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  350. </h4>
  351. <aside class="phpdocumentor-element-found-in">
  352. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  353. :
  354. <span class="phpdocumentor-element-found-in__line">39</span>
  355. </aside>
  356. <code class="phpdocumentor-code phpdocumentor-signature ">
  357. <span class="phpdocumentor-signature__visibility">public</span>
  358. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">new QROptions()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  359. <div class="phpdocumentor-label-line">
  360. </div>
  361. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  362. <dl class="phpdocumentor-argument-list">
  363. <dt class="phpdocumentor-argument-list__entry">
  364. <span class="phpdocumentor-signature__argument__name">$options</span>
  365. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  366. = <span class="phpdocumentor-signature__argument__default-value">new QROptions()</span> </dt>
  367. <dd class="phpdocumentor-argument-list__definition">
  368. </dd>
  369. </dl>
  370. </article>
  371. <article
  372. class="phpdocumentor-element
  373. -method
  374. -public
  375. "
  376. >
  377. <h4 class="phpdocumentor-element__name" id="method_decode">
  378. decode()
  379. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decode" class="headerlink"><i class="fas fa-link"></i></a>
  380. </h4>
  381. <aside class="phpdocumentor-element-found-in">
  382. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  383. :
  384. <span class="phpdocumentor-element-found-in__line">49</span>
  385. </aside>
  386. <p class="phpdocumentor-summary">Decodes a QR Code represented as a BitMatrix.</p>
  387. <code class="phpdocumentor-code phpdocumentor-signature ">
  388. <span class="phpdocumentor-signature__visibility">public</span>
  389. <span class="phpdocumentor-signature__name">decode</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$source</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a></span></code>
  390. <div class="phpdocumentor-label-line">
  391. </div>
  392. <section class="phpdocumentor-description"><p>A 1 or &quot;true&quot; is taken to mean a black module.</p>
  393. </section>
  394. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  395. <dl class="phpdocumentor-argument-list">
  396. <dt class="phpdocumentor-argument-list__entry">
  397. <span class="phpdocumentor-signature__argument__name">$source</span>
  398. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></span>
  399. </dt>
  400. <dd class="phpdocumentor-argument-list__definition">
  401. </dd>
  402. </dl>
  403. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  404. Tags
  405. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decode#tags" class="headerlink"><i class="fas fa-link"></i></a>
  406. </h5>
  407. <dl class="phpdocumentor-tag-list">
  408. <dt class="phpdocumentor-tag-list__entry">
  409. <span class="phpdocumentor-tag__name">throws</span>
  410. </dt>
  411. <dd class="phpdocumentor-tag-list__definition">
  412. <span class="phpdocumentor-tag-link"><abbr title="\Throwable">Throwable</abbr>|<a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  413. </dd>
  414. </dl>
  415. <section>
  416. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  417. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a></span>
  418. </section>
  419. </article>
  420. <article
  421. class="phpdocumentor-element
  422. -method
  423. -private
  424. "
  425. >
  426. <h4 class="phpdocumentor-element__name" id="method_decodeAlphanumSegment">
  427. decodeAlphanumSegment()
  428. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeAlphanumSegment" class="headerlink"><i class="fas fa-link"></i></a>
  429. </h4>
  430. <aside class="phpdocumentor-element-found-in">
  431. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  432. :
  433. <span class="phpdocumentor-element-found-in__line">170</span>
  434. </aside>
  435. <code class="phpdocumentor-code phpdocumentor-signature ">
  436. <span class="phpdocumentor-signature__visibility">private</span>
  437. <span class="phpdocumentor-signature__name">decodeAlphanumSegment</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$versionNumber</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">$fc1InEffect</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  438. <div class="phpdocumentor-label-line">
  439. </div>
  440. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  441. <dl class="phpdocumentor-argument-list">
  442. <dt class="phpdocumentor-argument-list__entry">
  443. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  444. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  445. </dt>
  446. <dd class="phpdocumentor-argument-list__definition">
  447. </dd>
  448. <dt class="phpdocumentor-argument-list__entry">
  449. <span class="phpdocumentor-signature__argument__name">$fc1InEffect</span>
  450. : <span class="phpdocumentor-signature__argument__return-type">bool</span>
  451. </dt>
  452. <dd class="phpdocumentor-argument-list__definition">
  453. </dd>
  454. </dl>
  455. <section>
  456. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  457. <span class="phpdocumentor-signature__response_type">string</span>
  458. </section>
  459. </article>
  460. <article
  461. class="phpdocumentor-element
  462. -method
  463. -private
  464. "
  465. >
  466. <h4 class="phpdocumentor-element__name" id="method_decodeBitStream">
  467. decodeBitStream()
  468. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeBitStream" class="headerlink"><i class="fas fa-link"></i></a>
  469. </h4>
  470. <aside class="phpdocumentor-element-found-in">
  471. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  472. :
  473. <span class="phpdocumentor-element-found-in__line">102</span>
  474. </aside>
  475. <p class="phpdocumentor-summary">Decode the contents of that stream of bytes</p>
  476. <code class="phpdocumentor-code phpdocumentor-signature ">
  477. <span class="phpdocumentor-signature__visibility">private</span>
  478. <span class="phpdocumentor-signature__name">decodeBitStream</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bitBuffer</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a></span></code>
  479. <div class="phpdocumentor-label-line">
  480. </div>
  481. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  482. <dl class="phpdocumentor-argument-list">
  483. <dt class="phpdocumentor-argument-list__entry">
  484. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  485. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  486. </dt>
  487. <dd class="phpdocumentor-argument-list__definition">
  488. </dd>
  489. </dl>
  490. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  491. Tags
  492. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeBitStream#tags" class="headerlink"><i class="fas fa-link"></i></a>
  493. </h5>
  494. <dl class="phpdocumentor-tag-list">
  495. <dt class="phpdocumentor-tag-list__entry">
  496. <span class="phpdocumentor-tag__name">throws</span>
  497. </dt>
  498. <dd class="phpdocumentor-tag-list__definition">
  499. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  500. </dd>
  501. </dl>
  502. <section>
  503. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  504. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a></span>
  505. </section>
  506. </article>
  507. <article
  508. class="phpdocumentor-element
  509. -method
  510. -private
  511. "
  512. >
  513. <h4 class="phpdocumentor-element__name" id="method_decodeMatrix">
  514. decodeMatrix()
  515. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  516. </h4>
  517. <aside class="phpdocumentor-element-found-in">
  518. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Decoder.php"><a href="files/src-decoder-decoder.html"><abbr title="src/Decoder/Decoder.php">Decoder.php</abbr></a></abbr>
  519. :
  520. <span class="phpdocumentor-element-found-in__line">81</span>
  521. </aside>
  522. <code class="phpdocumentor-code phpdocumentor-signature ">
  523. <span class="phpdocumentor-signature__visibility">private</span>
  524. <span class="phpdocumentor-signature__name">decodeMatrix</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a></span></code>
  525. <div class="phpdocumentor-label-line">
  526. </div>
  527. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  528. <dl class="phpdocumentor-argument-list">
  529. <dt class="phpdocumentor-argument-list__entry">
  530. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  531. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  532. </dt>
  533. <dd class="phpdocumentor-argument-list__definition">
  534. </dd>
  535. </dl>
  536. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  537. Tags
  538. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeMatrix#tags" class="headerlink"><i class="fas fa-link"></i></a>
  539. </h5>
  540. <dl class="phpdocumentor-tag-list">
  541. <dt class="phpdocumentor-tag-list__entry">
  542. <span class="phpdocumentor-tag__name">throws</span>
  543. </dt>
  544. <dd class="phpdocumentor-tag-list__definition">
  545. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  546. </dd>
  547. </dl>
  548. <section>
  549. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  550. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-DecoderResult.html"><abbr title="\chillerlan\QRCode\Decoder\DecoderResult">DecoderResult</abbr></a></span>
  551. </section>
  552. </article>
  553. </section>
  554. <div class="phpdocumentor-modal" id="source-view">
  555. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  556. <div class="phpdocumentor-modal-container">
  557. <div class="phpdocumentor-modal-content">
  558. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Decoder/Decoder.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  559. </div>
  560. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  561. </div>
  562. </div>
  563. <script type="text/javascript">
  564. (function () {
  565. function loadExternalCodeSnippet(el, url, line) {
  566. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  567. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  568. const language = 'php';
  569. const code = document.createElement('code');
  570. code.className = 'language-' + language;
  571. pre.textContent = '';
  572. pre.setAttribute('data-line', line)
  573. code.textContent = 'Loading…';
  574. pre.appendChild(code);
  575. var xhr = new XMLHttpRequest();
  576. xhr.open('GET', src, true);
  577. xhr.onreadystatechange = function () {
  578. if (xhr.readyState !== 4) {
  579. return;
  580. }
  581. if (xhr.status < 400 && xhr.responseText) {
  582. code.textContent = xhr.responseText;
  583. Prism.highlightElement(code);
  584. return;
  585. }
  586. if (xhr.status === 404) {
  587. code.textContent = '✖ Error: File could not be found';
  588. return;
  589. }
  590. if (xhr.status >= 400) {
  591. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  592. return;
  593. }
  594. code.textContent = '✖ Error: An unknown error occurred';
  595. };
  596. xhr.send(null);
  597. });
  598. }
  599. const modalButtons = document.querySelectorAll("[data-modal]");
  600. const openedAsLocalFile = window.location.protocol === 'file:';
  601. if (modalButtons.length > 0 && openedAsLocalFile) {
  602. console.warn(
  603. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  604. 'browsers block XHR requests when a page is opened this way'
  605. );
  606. }
  607. modalButtons.forEach(function (trigger) {
  608. if (openedAsLocalFile) {
  609. trigger.setAttribute("hidden", "hidden");
  610. }
  611. trigger.addEventListener("click", function (event) {
  612. event.preventDefault();
  613. const modal = document.getElementById(trigger.dataset.modal);
  614. if (!modal) {
  615. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  616. return;
  617. }
  618. modal.classList.add("phpdocumentor-modal__open");
  619. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  620. const exits = modal.querySelectorAll("[data-exit-button]");
  621. exits.forEach(function (exit) {
  622. exit.addEventListener("click", function (event) {
  623. event.preventDefault();
  624. modal.classList.remove("phpdocumentor-modal__open");
  625. });
  626. });
  627. });
  628. });
  629. })();
  630. </script>
  631. </article>
  632. </section>
  633. <section class="phpdocumentor-on-this-page__sidebar">
  634. <section class="phpdocumentor-on-this-page__content">
  635. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  636. <ul class="phpdocumentor-list -clean">
  637. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  638. <li>
  639. <ul class="phpdocumentor-list -clean">
  640. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#toc-properties">Properties</a></li>
  641. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#toc-methods">Methods</a></li>
  642. </ul>
  643. </li>
  644. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  645. <li>
  646. <ul class="phpdocumentor-list -clean">
  647. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_bitBuffer">$bitBuffer<a href="classes/chillerlan-QRCode-Decoder-Decoder.html"></li>
  648. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_eccLevel">$eccLevel<a href="classes/chillerlan-QRCode-Decoder-Decoder.html"></li>
  649. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_maskPattern">$maskPattern<a href="classes/chillerlan-QRCode-Decoder-Decoder.html"></li>
  650. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_options">$options<a href="classes/chillerlan-QRCode-Decoder-Decoder.html"></li>
  651. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#property_version">$version<a href="classes/chillerlan-QRCode-Decoder-Decoder.html"></li>
  652. </ul>
  653. </li>
  654. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  655. <li>
  656. <ul class="phpdocumentor-list -clean">
  657. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method___construct">__construct()</a></li>
  658. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decode">decode()</a></li>
  659. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeAlphanumSegment">decodeAlphanumSegment()</a></li>
  660. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeBitStream">decodeBitStream()</a></li>
  661. <li><a href="classes/chillerlan-QRCode-Decoder-Decoder.html#method_decodeMatrix">decodeMatrix()</a></li>
  662. </ul>
  663. </li>
  664. </ul>
  665. </section>
  666. </section>
  667. </div>
  668. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  669. <section class="phpdocumentor-search-results__dialog">
  670. <header class="phpdocumentor-search-results__header">
  671. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  672. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  673. </header>
  674. <section class="phpdocumentor-search-results__body">
  675. <ul class="phpdocumentor-search-results__entries"></ul>
  676. </section>
  677. </section>
  678. </section>
  679. </div>
  680. <a href="classes/chillerlan-QRCode-Decoder-Decoder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  681. </main>
  682. <script>
  683. cssVars({});
  684. </script>
  685. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  686. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  687. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  688. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  689. </body>
  690. </html>