chillerlan-QRCode-Data-QRDataModeAbstract.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  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. </section>
  89. <section class="phpdocumentor-sidebar__category -packages">
  90. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  91. <h4 class="phpdocumentor-sidebar__root-namespace">
  92. <a href="packages/Application.html" class="">Application</a>
  93. </h4>
  94. </section>
  95. <section class="phpdocumentor-sidebar__category -reports">
  96. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  97. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  98. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  100. </section>
  101. <section class="phpdocumentor-sidebar__category -indices">
  102. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  103. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  104. </section>
  105. </aside>
  106. <div class="phpdocumentor-column -nine phpdocumentor-content">
  107. <section>
  108. <ul class="phpdocumentor-breadcrumbs">
  109. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  110. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  111. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-data.html">Data</a></li>
  112. </ul>
  113. <article class="phpdocumentor-element -class">
  114. <h2 class="phpdocumentor-content__title">
  115. QRDataModeAbstract
  116. <div class="phpdocumentor-element__package">
  117. in package
  118. <ul class="phpdocumentor-breadcrumbs">
  119. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  120. </ul>
  121. </div>
  122. <span class="phpdocumentor-element__implements">
  123. implements
  124. <a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a> </span>
  125. </h2>
  126. <div class="phpdocumentor-label-line">
  127. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Abstract</span><span>Yes</span></div>
  128. </div>
  129. <aside class="phpdocumentor-element-found-in">
  130. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  131. :
  132. <span class="phpdocumentor-element-found-in__line">19</span>
  133. </aside>
  134. <p class="phpdocumentor-summary">abstract methods for the several data modes</p>
  135. <h3 id="toc">
  136. Table of Contents
  137. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  138. </h3>
  139. <h4 id="toc-interfaces">
  140. Interfaces
  141. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#toc-interfaces" class="headerlink"><i class="fas fa-link"></i></a>
  142. </h4>
  143. <dl class="phpdocumentor-table-of-contents">
  144. <dt class="phpdocumentor-table-of-contents__entry -interface"><a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a></dt><dd>Specifies the methods reqired for the data modules (Number, Alphanum, Byte and Kanji)</dd> </dl>
  145. <h4 id="toc-properties">
  146. Properties
  147. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  148. </h4>
  149. <dl class="phpdocumentor-table-of-contents">
  150. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  151. <a class="" href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data</a>
  152. <span>
  153. &nbsp;: string </span>
  154. </dt>
  155. <dd>The data to write</dd>
  156. </dl>
  157. <h4 id="toc-methods">
  158. Methods
  159. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  160. </h4>
  161. <dl class="phpdocumentor-table-of-contents">
  162. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  163. <a class="" href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a>
  164. <span>
  165. &nbsp;: mixed </span>
  166. </dt>
  167. <dd>QRDataModeAbstract constructor.</dd>
  168. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  169. <a class="" href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_convertEncoding">convertEncoding()</a>
  170. <span>
  171. &nbsp;: string </span>
  172. </dt>
  173. <dd>encoding conversion helper</dd>
  174. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  175. <a class="" href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getCharCount">getCharCount()</a>
  176. <span>
  177. &nbsp;: int </span>
  178. </dt>
  179. <dd>returns the character count of the $data string</dd>
  180. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  181. <a class="" href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a>
  182. <span>
  183. &nbsp;: int </span>
  184. </dt>
  185. <dd>shortcut</dd>
  186. </dl>
  187. <section class="phpdocumentor-properties">
  188. <h3 class="phpdocumentor-elements__header" id="properties">
  189. Properties
  190. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  191. </h3>
  192. <article
  193. class="
  194. phpdocumentor-element
  195. -property
  196. -protected
  197. "
  198. >
  199. <h4 class="phpdocumentor-element__name" id="property_data">
  200. $data
  201. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data" class="headerlink"><i class="fas fa-link"></i></a>
  202. <span class="phpdocumentor-element__modifiers">
  203. </span>
  204. </h4>
  205. <aside class="phpdocumentor-element-found-in">
  206. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  207. :
  208. <span class="phpdocumentor-element-found-in__line">24</span>
  209. </aside>
  210. <p class="phpdocumentor-summary">The data to write</p>
  211. <code class="phpdocumentor-code phpdocumentor-signature ">
  212. <span class="phpdocumentor-signature__visibility">protected</span>
  213. <span class="phpdocumentor-signature__type">string</span>
  214. <span class="phpdocumentor-signature__name">$data</span>
  215. </code>
  216. </article>
  217. </section>
  218. <section class="phpdocumentor-methods">
  219. <h3 class="phpdocumentor-elements__header" id="methods">
  220. Methods
  221. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  222. </h3>
  223. <article
  224. class="phpdocumentor-element
  225. -method
  226. -public
  227. "
  228. >
  229. <h4 class="phpdocumentor-element__name" id="method___construct">
  230. __construct()
  231. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  232. </h4>
  233. <aside class="phpdocumentor-element-found-in">
  234. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  235. :
  236. <span class="phpdocumentor-element-found-in__line">31</span>
  237. </aside>
  238. <p class="phpdocumentor-summary">QRDataModeAbstract constructor.</p>
  239. <code class="phpdocumentor-code phpdocumentor-signature ">
  240. <span class="phpdocumentor-signature__visibility">public</span>
  241. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  242. <div class="phpdocumentor-label-line">
  243. </div>
  244. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  245. <dl class="phpdocumentor-argument-list">
  246. <dt class="phpdocumentor-argument-list__entry">
  247. <span class="phpdocumentor-signature__argument__name">$data</span>
  248. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  249. </dt>
  250. <dd class="phpdocumentor-argument-list__definition">
  251. </dd>
  252. </dl>
  253. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  254. Tags
  255. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct#tags" class="headerlink"><i class="fas fa-link"></i></a>
  256. </h5>
  257. <dl class="phpdocumentor-tag-list">
  258. <dt class="phpdocumentor-tag-list__entry">
  259. <span class="phpdocumentor-tag__name">throws</span>
  260. </dt>
  261. <dd class="phpdocumentor-tag-list__definition">
  262. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  263. </dd>
  264. </dl>
  265. </article>
  266. <article
  267. class="phpdocumentor-element
  268. -method
  269. -public
  270. -static "
  271. >
  272. <h4 class="phpdocumentor-element__name" id="method_convertEncoding">
  273. convertEncoding()
  274. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_convertEncoding" class="headerlink"><i class="fas fa-link"></i></a>
  275. </h4>
  276. <aside class="phpdocumentor-element-found-in">
  277. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  278. :
  279. <span class="phpdocumentor-element-found-in__line">48</span>
  280. </aside>
  281. <p class="phpdocumentor-summary">encoding conversion helper</p>
  282. <code class="phpdocumentor-code phpdocumentor-signature ">
  283. <span class="phpdocumentor-signature__visibility">public</span>
  284. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">convertEncoding</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$string</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  285. <div class="phpdocumentor-label-line">
  286. </div>
  287. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  288. <dl class="phpdocumentor-argument-list">
  289. <dt class="phpdocumentor-argument-list__entry">
  290. <span class="phpdocumentor-signature__argument__name">$string</span>
  291. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  292. </dt>
  293. <dd class="phpdocumentor-argument-list__definition">
  294. </dd>
  295. </dl>
  296. <section>
  297. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  298. <span class="phpdocumentor-signature__response_type">string</span>
  299. </section>
  300. </article>
  301. <article
  302. class="phpdocumentor-element
  303. -method
  304. -protected
  305. "
  306. >
  307. <h4 class="phpdocumentor-element__name" id="method_getCharCount">
  308. getCharCount()
  309. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getCharCount" class="headerlink"><i class="fas fa-link"></i></a>
  310. </h4>
  311. <aside class="phpdocumentor-element-found-in">
  312. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  313. :
  314. <span class="phpdocumentor-element-found-in__line">44</span>
  315. </aside>
  316. <p class="phpdocumentor-summary">returns the character count of the $data string</p>
  317. <code class="phpdocumentor-code phpdocumentor-signature ">
  318. <span class="phpdocumentor-signature__visibility">protected</span>
  319. <span class="phpdocumentor-signature__name">getCharCount</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  320. <div class="phpdocumentor-label-line">
  321. </div>
  322. <section>
  323. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  324. <span class="phpdocumentor-signature__response_type">int</span>
  325. </section>
  326. </article>
  327. <article
  328. class="phpdocumentor-element
  329. -method
  330. -protected
  331. -static "
  332. >
  333. <h4 class="phpdocumentor-element__name" id="method_getLengthBits">
  334. getLengthBits()
  335. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits" class="headerlink"><i class="fas fa-link"></i></a>
  336. </h4>
  337. <aside class="phpdocumentor-element-found-in">
  338. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/QRDataModeAbstract.php"><a href="files/src-data-qrdatamodeabstract.html"><abbr title="src/Data/QRDataModeAbstract.php">QRDataModeAbstract.php</abbr></a></abbr>
  339. :
  340. <span class="phpdocumentor-element-found-in__line">55</span>
  341. </aside>
  342. <p class="phpdocumentor-summary">shortcut</p>
  343. <code class="phpdocumentor-code phpdocumentor-signature ">
  344. <span class="phpdocumentor-signature__visibility">protected</span>
  345. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getLengthBits</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>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  346. <div class="phpdocumentor-label-line">
  347. </div>
  348. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  349. <dl class="phpdocumentor-argument-list">
  350. <dt class="phpdocumentor-argument-list__entry">
  351. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  352. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  353. </dt>
  354. <dd class="phpdocumentor-argument-list__definition">
  355. </dd>
  356. </dl>
  357. <section>
  358. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  359. <span class="phpdocumentor-signature__response_type">int</span>
  360. </section>
  361. </article>
  362. </section>
  363. <div class="phpdocumentor-modal" id="source-view">
  364. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  365. <div class="phpdocumentor-modal-container">
  366. <div class="phpdocumentor-modal-content">
  367. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Data/QRDataModeAbstract.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  368. </div>
  369. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  370. </div>
  371. </div>
  372. <script type="text/javascript">
  373. (function () {
  374. function loadExternalCodeSnippet(el, url, line) {
  375. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  376. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  377. const language = 'php';
  378. const code = document.createElement('code');
  379. code.className = 'language-' + language;
  380. pre.textContent = '';
  381. pre.setAttribute('data-line', line)
  382. code.textContent = 'Loading…';
  383. pre.appendChild(code);
  384. var xhr = new XMLHttpRequest();
  385. xhr.open('GET', src, true);
  386. xhr.onreadystatechange = function () {
  387. if (xhr.readyState !== 4) {
  388. return;
  389. }
  390. if (xhr.status < 400 && xhr.responseText) {
  391. code.textContent = xhr.responseText;
  392. Prism.highlightElement(code);
  393. return;
  394. }
  395. if (xhr.status === 404) {
  396. code.textContent = '✖ Error: File could not be found';
  397. return;
  398. }
  399. if (xhr.status >= 400) {
  400. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  401. return;
  402. }
  403. code.textContent = '✖ Error: An unknown error occurred';
  404. };
  405. xhr.send(null);
  406. });
  407. }
  408. const modalButtons = document.querySelectorAll("[data-modal]");
  409. const openedAsLocalFile = window.location.protocol === 'file:';
  410. if (modalButtons.length > 0 && openedAsLocalFile) {
  411. console.warn(
  412. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  413. 'browsers block XHR requests when a page is opened this way'
  414. );
  415. }
  416. modalButtons.forEach(function (trigger) {
  417. if (openedAsLocalFile) {
  418. trigger.setAttribute("hidden", "hidden");
  419. }
  420. trigger.addEventListener("click", function (event) {
  421. event.preventDefault();
  422. const modal = document.getElementById(trigger.dataset.modal);
  423. if (!modal) {
  424. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  425. return;
  426. }
  427. modal.classList.add("phpdocumentor-modal__open");
  428. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  429. const exits = modal.querySelectorAll("[data-exit-button]");
  430. exits.forEach(function (exit) {
  431. exit.addEventListener("click", function (event) {
  432. event.preventDefault();
  433. modal.classList.remove("phpdocumentor-modal__open");
  434. });
  435. });
  436. });
  437. });
  438. })();
  439. </script>
  440. </article>
  441. </section>
  442. <section class="phpdocumentor-on-this-page__sidebar">
  443. <section class="phpdocumentor-on-this-page__content">
  444. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  445. <ul class="phpdocumentor-list -clean">
  446. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  447. <li>
  448. <ul class="phpdocumentor-list -clean">
  449. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#toc-properties">Properties</a></li>
  450. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#toc-methods">Methods</a></li>
  451. </ul>
  452. </li>
  453. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  454. <li>
  455. <ul class="phpdocumentor-list -clean">
  456. <li class=""><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data</a></li>
  457. </ul>
  458. </li>
  459. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  460. <li>
  461. <ul class="phpdocumentor-list -clean">
  462. <li class=""><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a></li>
  463. <li class=""><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_convertEncoding">convertEncoding()</a></li>
  464. <li class=""><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getCharCount">getCharCount()</a></li>
  465. <li class=""><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a></li>
  466. </ul>
  467. </li>
  468. </ul>
  469. </section>
  470. </section>
  471. </div>
  472. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  473. <section class="phpdocumentor-search-results__dialog">
  474. <header class="phpdocumentor-search-results__header">
  475. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  476. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  477. </header>
  478. <section class="phpdocumentor-search-results__body">
  479. <ul class="phpdocumentor-search-results__entries"></ul>
  480. </section>
  481. </section>
  482. </section>
  483. </div>
  484. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  485. </main>
  486. <script>
  487. cssVars({});
  488. </script>
  489. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  490. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  491. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  492. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  493. </body>
  494. </html>