chillerlan-QRCode-Decoder-Decoder.html 44 KB

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