chillerlan-QRCode-Data-Hanzi.html 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168
  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-data.html">Data</a></li>
  115. </ul>
  116. <article class="phpdocumentor-element -class">
  117. <h2 class="phpdocumentor-content__title">
  118. Hanzi
  119. <span class="phpdocumentor-element__extends">
  120. extends <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeAbstract">QRDataModeAbstract</abbr></a>
  121. </span>
  122. <div class="phpdocumentor-element__package">
  123. in package
  124. <ul class="phpdocumentor-breadcrumbs">
  125. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  126. </ul>
  127. </div>
  128. </h2>
  129. <div class="phpdocumentor-label-line">
  130. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  131. </div>
  132. <aside class="phpdocumentor-element-found-in">
  133. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  134. :
  135. <span class="phpdocumentor-element-found-in__line">30</span>
  136. </aside>
  137. <p class="phpdocumentor-summary">Hanzi (simplified Chinese) mode, GBT18284-2000: 13-bit double-byte characters from the GB2312/GB18030 character set</p>
  138. <section class="phpdocumentor-description"><p>Please note that this is not part of the QR Code specification and may not be supported by all readers (ZXing-based ones do).</p>
  139. </section>
  140. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  141. Tags
  142. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  143. </h5>
  144. <dl class="phpdocumentor-tag-list">
  145. <dt class="phpdocumentor-tag-list__entry">
  146. <span class="phpdocumentor-tag__name">see</span>
  147. </dt>
  148. <dd class="phpdocumentor-tag-list__definition">
  149. <span class="phpdocumentor-tag-link"><a href="https://en.wikipedia.org/wiki/GB_2312">https://en.wikipedia.org/wiki/GB_2312</a></span>
  150. </dd>
  151. <dt class="phpdocumentor-tag-list__entry">
  152. <span class="phpdocumentor-tag__name">see</span>
  153. </dt>
  154. <dd class="phpdocumentor-tag-list__definition">
  155. <span class="phpdocumentor-tag-link"><a href="http://www.herongyang.com/GB2312/Introduction-of-GB2312.html">http://www.herongyang.com/GB2312/Introduction-of-GB2312.html</a></span>
  156. </dd>
  157. <dt class="phpdocumentor-tag-list__entry">
  158. <span class="phpdocumentor-tag__name">see</span>
  159. </dt>
  160. <dd class="phpdocumentor-tag-list__definition">
  161. <span class="phpdocumentor-tag-link"><a href="https://en.wikipedia.org/wiki/GBK_(character_encoding)#Encoding">https://en.wikipedia.org/wiki/GBK_(character_encoding)#Encoding</a></span>
  162. </dd>
  163. <dt class="phpdocumentor-tag-list__entry">
  164. <span class="phpdocumentor-tag__name">see</span>
  165. </dt>
  166. <dd class="phpdocumentor-tag-list__definition">
  167. <span class="phpdocumentor-tag-link"><a href="https://gist.github.com/codemasher/91da33c44bfb48a81a6c1426bb8e4338">https://gist.github.com/codemasher/91da33c44bfb48a81a6c1426bb8e4338</a></span>
  168. </dd>
  169. <dt class="phpdocumentor-tag-list__entry">
  170. <span class="phpdocumentor-tag__name">see</span>
  171. </dt>
  172. <dd class="phpdocumentor-tag-list__definition">
  173. <span class="phpdocumentor-tag-link"><a href="https://github.com/zxing/zxing/blob/dfb06fa33b17a9e68321be151c22846c7b78048f/core/src/main/java/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java#L172-L209">https://github.com/zxing/zxing/blob/dfb06fa33b17a9e68321be151c22846c7b78048f/core/src/main/java/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java#L172-L209</a></span>
  174. </dd>
  175. <dt class="phpdocumentor-tag-list__entry">
  176. <span class="phpdocumentor-tag__name">see</span>
  177. </dt>
  178. <dd class="phpdocumentor-tag-list__definition">
  179. <span class="phpdocumentor-tag-link"><a href="https://www.chinesestandard.net/PDF/English.aspx/GBT18284-2000">https://www.chinesestandard.net/PDF/English.aspx/GBT18284-2000</a></span>
  180. </dd>
  181. </dl>
  182. <h3 id="toc">
  183. Table of Contents
  184. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  185. </h3>
  186. <h4 id="toc-constants">
  187. Constants
  188. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  189. </h4>
  190. <dl class="phpdocumentor-table-of-contents">
  191. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  192. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE">DATAMODE</a>
  193. <span>
  194. &nbsp;= \chillerlan\QRCode\Common\Mode::HANZI </span>
  195. </dt>
  196. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  197. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_ENCODING">ENCODING</a>
  198. <span>
  199. &nbsp;= &#039;GB18030&#039; </span>
  200. </dt>
  201. <dd>possible values: GB2312, GB18030</dd>
  202. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  203. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET">GB2312_SUBSET</a>
  204. <span>
  205. &nbsp;= 0b1 </span>
  206. </dt>
  207. </dl>
  208. <h4 id="toc-properties">
  209. Properties
  210. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  211. </h4>
  212. <dl class="phpdocumentor-table-of-contents">
  213. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  214. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data</a>
  215. <span>
  216. &nbsp;: string </span>
  217. </dt>
  218. <dd>The data to write</dd>
  219. </dl>
  220. <h4 id="toc-methods">
  221. Methods
  222. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  223. </h4>
  224. <dl class="phpdocumentor-table-of-contents">
  225. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  226. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a>
  227. <span>
  228. &nbsp;: mixed </span>
  229. </dt>
  230. <dd>QRDataModeAbstract constructor.</dd>
  231. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  232. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding">convertEncoding()</a>
  233. <span>
  234. &nbsp;: string </span>
  235. </dt>
  236. <dd>encoding conversion helper</dd>
  237. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  238. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment">decodeSegment()</a>
  239. <span>
  240. &nbsp;: string </span>
  241. </dt>
  242. <dd>See specification GBT 18284-2000</dd>
  243. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  244. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits">getLengthInBits()</a>
  245. <span>
  246. &nbsp;: int </span>
  247. </dt>
  248. <dd>retruns the length in bits of the data string</dd>
  249. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  250. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_validateString">validateString()</a>
  251. <span>
  252. &nbsp;: bool </span>
  253. </dt>
  254. <dd>checks if a string qualifies as Hanzi/GB2312</dd>
  255. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  256. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write">write()</a>
  257. <span>
  258. &nbsp;: static </span>
  259. </dt>
  260. <dd>writes the actual data string to the BitBuffer, uses the given version to determine the length bits</dd>
  261. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  262. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount">getCharCount()</a>
  263. <span>
  264. &nbsp;: int </span>
  265. </dt>
  266. <dd>returns the character count of the $data string</dd>
  267. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  268. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a>
  269. <span>
  270. &nbsp;: int </span>
  271. </dt>
  272. <dd>shortcut</dd>
  273. </dl>
  274. <section class="phpdocumentor-constants">
  275. <h3 class="phpdocumentor-elements__header" id="constants">
  276. Constants
  277. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  278. </h3>
  279. <article class="phpdocumentor-element -constant -public ">
  280. <h4 class="phpdocumentor-element__name" id="constant_DATAMODE">
  281. DATAMODE
  282. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE" class="headerlink"><i class="fas fa-link"></i></a>
  283. </h4>
  284. <aside class="phpdocumentor-element-found-in">
  285. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  286. :
  287. <span class="phpdocumentor-element-found-in__line">49</span>
  288. </aside>
  289. <code class="phpdocumentor-signature phpdocumentor-code ">
  290. <span class="phpdocumentor-signature__visibility">public</span>
  291. <span class="phpdocumentor-signature__type">mixed</span>
  292. <span class="phpdocumentor-signature__name">DATAMODE</span>
  293. = <span class="phpdocumentor-signature__default-value">\chillerlan\QRCode\Common\Mode::HANZI</span>
  294. </code>
  295. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  296. Tags
  297. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE#tags" class="headerlink"><i class="fas fa-link"></i></a>
  298. </h5>
  299. <dl class="phpdocumentor-tag-list">
  300. <dt class="phpdocumentor-tag-list__entry">
  301. <span class="phpdocumentor-tag__name">inheritDoc</span>
  302. </dt>
  303. <dd class="phpdocumentor-tag-list__definition">
  304. </dd>
  305. </dl>
  306. </article>
  307. <article class="phpdocumentor-element -constant -public ">
  308. <h4 class="phpdocumentor-element__name" id="constant_ENCODING">
  309. ENCODING
  310. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_ENCODING" class="headerlink"><i class="fas fa-link"></i></a>
  311. </h4>
  312. <aside class="phpdocumentor-element-found-in">
  313. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  314. :
  315. <span class="phpdocumentor-element-found-in__line">37</span>
  316. </aside>
  317. <p class="phpdocumentor-summary">possible values: GB2312, GB18030</p>
  318. <code class="phpdocumentor-signature phpdocumentor-code ">
  319. <span class="phpdocumentor-signature__visibility">public</span>
  320. <span class="phpdocumentor-signature__type">string</span>
  321. <span class="phpdocumentor-signature__name">ENCODING</span>
  322. = <span class="phpdocumentor-signature__default-value">&#039;GB18030&#039;</span>
  323. </code>
  324. </article>
  325. <article class="phpdocumentor-element -constant -public ">
  326. <h4 class="phpdocumentor-element__name" id="constant_GB2312_SUBSET">
  327. GB2312_SUBSET
  328. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET" class="headerlink"><i class="fas fa-link"></i></a>
  329. </h4>
  330. <aside class="phpdocumentor-element-found-in">
  331. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  332. :
  333. <span class="phpdocumentor-element-found-in__line">44</span>
  334. </aside>
  335. <code class="phpdocumentor-signature phpdocumentor-code ">
  336. <span class="phpdocumentor-signature__visibility">public</span>
  337. <span class="phpdocumentor-signature__type">int</span>
  338. <span class="phpdocumentor-signature__name">GB2312_SUBSET</span>
  339. = <span class="phpdocumentor-signature__default-value">0b1</span>
  340. </code>
  341. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  342. Tags
  343. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET#tags" class="headerlink"><i class="fas fa-link"></i></a>
  344. </h5>
  345. <dl class="phpdocumentor-tag-list">
  346. <dt class="phpdocumentor-tag-list__entry">
  347. <span class="phpdocumentor-tag__name">todo:</span>
  348. </dt>
  349. <dd class="phpdocumentor-tag-list__definition">
  350. <section class="phpdocumentor-description"><p>other subsets???</p>
  351. </section>
  352. </dd>
  353. </dl>
  354. </article>
  355. </section>
  356. <section class="phpdocumentor-properties">
  357. <h3 class="phpdocumentor-elements__header" id="properties">
  358. Properties
  359. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  360. </h3>
  361. <article
  362. class="
  363. phpdocumentor-element
  364. -property
  365. -protected
  366. "
  367. >
  368. <h4 class="phpdocumentor-element__name" id="property_data">
  369. $data
  370. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data" class="headerlink"><i class="fas fa-link"></i></a>
  371. <span class="phpdocumentor-element__modifiers">
  372. </span>
  373. </h4>
  374. <aside class="phpdocumentor-element-found-in">
  375. <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>
  376. :
  377. <span class="phpdocumentor-element-found-in__line">23</span>
  378. </aside>
  379. <p class="phpdocumentor-summary">The data to write</p>
  380. <code class="phpdocumentor-code phpdocumentor-signature ">
  381. <span class="phpdocumentor-signature__visibility">protected</span>
  382. <span class="phpdocumentor-signature__type">string</span>
  383. <span class="phpdocumentor-signature__name">$data</span>
  384. </code>
  385. </article>
  386. </section>
  387. <section class="phpdocumentor-methods">
  388. <h3 class="phpdocumentor-elements__header" id="methods">
  389. Methods
  390. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  391. </h3>
  392. <article
  393. class="phpdocumentor-element
  394. -method
  395. -public
  396. "
  397. >
  398. <h4 class="phpdocumentor-element__name" id="method___construct">
  399. __construct()
  400. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  401. </h4>
  402. <aside class="phpdocumentor-element-found-in">
  403. <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>
  404. :
  405. <span class="phpdocumentor-element-found-in__line">30</span>
  406. </aside>
  407. <p class="phpdocumentor-summary">QRDataModeAbstract constructor.</p>
  408. <code class="phpdocumentor-code phpdocumentor-signature ">
  409. <span class="phpdocumentor-signature__visibility">public</span>
  410. <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>
  411. <div class="phpdocumentor-label-line">
  412. </div>
  413. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  414. <dl class="phpdocumentor-argument-list">
  415. <dt class="phpdocumentor-argument-list__entry">
  416. <span class="phpdocumentor-signature__argument__name">$data</span>
  417. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  418. </dt>
  419. <dd class="phpdocumentor-argument-list__definition">
  420. </dd>
  421. </dl>
  422. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  423. Tags
  424. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct#tags" class="headerlink"><i class="fas fa-link"></i></a>
  425. </h5>
  426. <dl class="phpdocumentor-tag-list">
  427. <dt class="phpdocumentor-tag-list__entry">
  428. <span class="phpdocumentor-tag__name">throws</span>
  429. </dt>
  430. <dd class="phpdocumentor-tag-list__definition">
  431. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  432. </dd>
  433. </dl>
  434. </article>
  435. <article
  436. class="phpdocumentor-element
  437. -method
  438. -public
  439. -static "
  440. >
  441. <h4 class="phpdocumentor-element__name" id="method_convertEncoding">
  442. convertEncoding()
  443. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding" class="headerlink"><i class="fas fa-link"></i></a>
  444. </h4>
  445. <aside class="phpdocumentor-element-found-in">
  446. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  447. :
  448. <span class="phpdocumentor-element-found-in__line">68</span>
  449. </aside>
  450. <p class="phpdocumentor-summary">encoding conversion helper</p>
  451. <code class="phpdocumentor-code phpdocumentor-signature ">
  452. <span class="phpdocumentor-signature__visibility">public</span>
  453. <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>
  454. <div class="phpdocumentor-label-line">
  455. </div>
  456. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  457. <dl class="phpdocumentor-argument-list">
  458. <dt class="phpdocumentor-argument-list__entry">
  459. <span class="phpdocumentor-signature__argument__name">$string</span>
  460. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  461. </dt>
  462. <dd class="phpdocumentor-argument-list__definition">
  463. </dd>
  464. </dl>
  465. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  466. Tags
  467. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding#tags" class="headerlink"><i class="fas fa-link"></i></a>
  468. </h5>
  469. <dl class="phpdocumentor-tag-list">
  470. <dt class="phpdocumentor-tag-list__entry">
  471. <span class="phpdocumentor-tag__name">inheritDoc</span>
  472. </dt>
  473. <dd class="phpdocumentor-tag-list__definition">
  474. </dd>
  475. </dl>
  476. <section>
  477. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  478. <span class="phpdocumentor-signature__response_type">string</span>
  479. </section>
  480. </article>
  481. <article
  482. class="phpdocumentor-element
  483. -method
  484. -public
  485. -static "
  486. >
  487. <h4 class="phpdocumentor-element__name" id="method_decodeSegment">
  488. decodeSegment()
  489. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment" class="headerlink"><i class="fas fa-link"></i></a>
  490. </h4>
  491. <aside class="phpdocumentor-element-found-in">
  492. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  493. :
  494. <span class="phpdocumentor-element-found-in__line">170</span>
  495. </aside>
  496. <p class="phpdocumentor-summary">See specification GBT 18284-2000</p>
  497. <code class="phpdocumentor-code phpdocumentor-signature ">
  498. <span class="phpdocumentor-signature__visibility">public</span>
  499. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">decodeSegment</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 class="phpdocumentor-signature__argument"><span>, </span><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">string</span></code>
  500. <div class="phpdocumentor-label-line">
  501. </div>
  502. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  503. <dl class="phpdocumentor-argument-list">
  504. <dt class="phpdocumentor-argument-list__entry">
  505. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  506. : <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>
  507. </dt>
  508. <dd class="phpdocumentor-argument-list__definition">
  509. </dd>
  510. <dt class="phpdocumentor-argument-list__entry">
  511. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  512. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  513. </dt>
  514. <dd class="phpdocumentor-argument-list__definition">
  515. </dd>
  516. </dl>
  517. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  518. Tags
  519. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment#tags" class="headerlink"><i class="fas fa-link"></i></a>
  520. </h5>
  521. <dl class="phpdocumentor-tag-list">
  522. <dt class="phpdocumentor-tag-list__entry">
  523. <span class="phpdocumentor-tag__name">throws</span>
  524. </dt>
  525. <dd class="phpdocumentor-tag-list__definition">
  526. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  527. </dd>
  528. </dl>
  529. <section>
  530. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  531. <span class="phpdocumentor-signature__response_type">string</span>
  532. </section>
  533. </article>
  534. <article
  535. class="phpdocumentor-element
  536. -method
  537. -public
  538. "
  539. >
  540. <h4 class="phpdocumentor-element__name" id="method_getLengthInBits">
  541. getLengthInBits()
  542. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits" class="headerlink"><i class="fas fa-link"></i></a>
  543. </h4>
  544. <aside class="phpdocumentor-element-found-in">
  545. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  546. :
  547. <span class="phpdocumentor-element-found-in__line">61</span>
  548. </aside>
  549. <p class="phpdocumentor-summary">retruns the length in bits of the data string</p>
  550. <code class="phpdocumentor-code phpdocumentor-signature ">
  551. <span class="phpdocumentor-signature__visibility">public</span>
  552. <span class="phpdocumentor-signature__name">getLengthInBits</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  553. <div class="phpdocumentor-label-line">
  554. </div>
  555. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  556. Tags
  557. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits#tags" class="headerlink"><i class="fas fa-link"></i></a>
  558. </h5>
  559. <dl class="phpdocumentor-tag-list">
  560. <dt class="phpdocumentor-tag-list__entry">
  561. <span class="phpdocumentor-tag__name">inheritDoc</span>
  562. </dt>
  563. <dd class="phpdocumentor-tag-list__definition">
  564. </dd>
  565. </dl>
  566. <section>
  567. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  568. <span class="phpdocumentor-signature__response_type">int</span>
  569. </section>
  570. </article>
  571. <article
  572. class="phpdocumentor-element
  573. -method
  574. -public
  575. -static "
  576. >
  577. <h4 class="phpdocumentor-element__name" id="method_validateString">
  578. validateString()
  579. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_validateString" class="headerlink"><i class="fas fa-link"></i></a>
  580. </h4>
  581. <aside class="phpdocumentor-element-found-in">
  582. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  583. :
  584. <span class="phpdocumentor-element-found-in__line">93</span>
  585. </aside>
  586. <p class="phpdocumentor-summary">checks if a string qualifies as Hanzi/GB2312</p>
  587. <code class="phpdocumentor-code phpdocumentor-signature ">
  588. <span class="phpdocumentor-signature__visibility">public</span>
  589. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">validateString</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">bool</span></code>
  590. <div class="phpdocumentor-label-line">
  591. </div>
  592. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  593. <dl class="phpdocumentor-argument-list">
  594. <dt class="phpdocumentor-argument-list__entry">
  595. <span class="phpdocumentor-signature__argument__name">$string</span>
  596. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  597. </dt>
  598. <dd class="phpdocumentor-argument-list__definition">
  599. </dd>
  600. </dl>
  601. <section>
  602. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  603. <span class="phpdocumentor-signature__response_type">bool</span>
  604. </section>
  605. </article>
  606. <article
  607. class="phpdocumentor-element
  608. -method
  609. -public
  610. "
  611. >
  612. <h4 class="phpdocumentor-element__name" id="method_write">
  613. write()
  614. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write" class="headerlink"><i class="fas fa-link"></i></a>
  615. </h4>
  616. <aside class="phpdocumentor-element-found-in">
  617. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  618. :
  619. <span class="phpdocumentor-element-found-in__line">132</span>
  620. </aside>
  621. <p class="phpdocumentor-summary">writes the actual data string to the BitBuffer, uses the given version to determine the length bits</p>
  622. <code class="phpdocumentor-code phpdocumentor-signature ">
  623. <span class="phpdocumentor-signature__visibility">public</span>
  624. <span class="phpdocumentor-signature__name">write</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 class="phpdocumentor-signature__argument"><span>, </span><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">static</span></code>
  625. <div class="phpdocumentor-label-line">
  626. </div>
  627. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  628. <dl class="phpdocumentor-argument-list">
  629. <dt class="phpdocumentor-argument-list__entry">
  630. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  631. : <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>
  632. </dt>
  633. <dd class="phpdocumentor-argument-list__definition">
  634. </dd>
  635. <dt class="phpdocumentor-argument-list__entry">
  636. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  637. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  638. </dt>
  639. <dd class="phpdocumentor-argument-list__definition">
  640. </dd>
  641. </dl>
  642. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  643. Tags
  644. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write#tags" class="headerlink"><i class="fas fa-link"></i></a>
  645. </h5>
  646. <dl class="phpdocumentor-tag-list">
  647. <dt class="phpdocumentor-tag-list__entry">
  648. <span class="phpdocumentor-tag__name">inheritDoc</span>
  649. </dt>
  650. <dd class="phpdocumentor-tag-list__definition">
  651. </dd>
  652. <dt class="phpdocumentor-tag-list__entry">
  653. <span class="phpdocumentor-tag__name">throws</span>
  654. </dt>
  655. <dd class="phpdocumentor-tag-list__definition">
  656. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  657. <section class="phpdocumentor-description"><p>on an illegal character occurence</p>
  658. </section>
  659. </dd>
  660. </dl>
  661. <section>
  662. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  663. <span class="phpdocumentor-signature__response_type">static</span>
  664. </section>
  665. </article>
  666. <article
  667. class="phpdocumentor-element
  668. -method
  669. -protected
  670. "
  671. >
  672. <h4 class="phpdocumentor-element__name" id="method_getCharCount">
  673. getCharCount()
  674. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount" class="headerlink"><i class="fas fa-link"></i></a>
  675. </h4>
  676. <aside class="phpdocumentor-element-found-in">
  677. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  678. :
  679. <span class="phpdocumentor-element-found-in__line">54</span>
  680. </aside>
  681. <p class="phpdocumentor-summary">returns the character count of the $data string</p>
  682. <code class="phpdocumentor-code phpdocumentor-signature ">
  683. <span class="phpdocumentor-signature__visibility">protected</span>
  684. <span class="phpdocumentor-signature__name">getCharCount</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  685. <div class="phpdocumentor-label-line">
  686. </div>
  687. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  688. Tags
  689. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount#tags" class="headerlink"><i class="fas fa-link"></i></a>
  690. </h5>
  691. <dl class="phpdocumentor-tag-list">
  692. <dt class="phpdocumentor-tag-list__entry">
  693. <span class="phpdocumentor-tag__name">inheritDoc</span>
  694. </dt>
  695. <dd class="phpdocumentor-tag-list__definition">
  696. </dd>
  697. </dl>
  698. <section>
  699. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  700. <span class="phpdocumentor-signature__response_type">int</span>
  701. </section>
  702. </article>
  703. <article
  704. class="phpdocumentor-element
  705. -method
  706. -protected
  707. -static "
  708. >
  709. <h4 class="phpdocumentor-element__name" id="method_getLengthBits">
  710. getLengthBits()
  711. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits" class="headerlink"><i class="fas fa-link"></i></a>
  712. </h4>
  713. <aside class="phpdocumentor-element-found-in">
  714. <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>
  715. :
  716. <span class="phpdocumentor-element-found-in__line">57</span>
  717. </aside>
  718. <p class="phpdocumentor-summary">shortcut</p>
  719. <code class="phpdocumentor-code phpdocumentor-signature ">
  720. <span class="phpdocumentor-signature__visibility">protected</span>
  721. <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>
  722. <div class="phpdocumentor-label-line">
  723. </div>
  724. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  725. <dl class="phpdocumentor-argument-list">
  726. <dt class="phpdocumentor-argument-list__entry">
  727. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  728. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  729. </dt>
  730. <dd class="phpdocumentor-argument-list__definition">
  731. </dd>
  732. </dl>
  733. <section>
  734. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  735. <span class="phpdocumentor-signature__response_type">int</span>
  736. </section>
  737. </article>
  738. </section>
  739. <div class="phpdocumentor-modal" id="source-view">
  740. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  741. <div class="phpdocumentor-modal-container">
  742. <div class="phpdocumentor-modal-content">
  743. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Data/Hanzi.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  744. </div>
  745. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  746. </div>
  747. </div>
  748. <script type="text/javascript">
  749. (function () {
  750. function loadExternalCodeSnippet(el, url, line) {
  751. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  752. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  753. const language = 'php';
  754. const code = document.createElement('code');
  755. code.className = 'language-' + language;
  756. pre.textContent = '';
  757. pre.setAttribute('data-line', line)
  758. code.textContent = 'Loading…';
  759. pre.appendChild(code);
  760. var xhr = new XMLHttpRequest();
  761. xhr.open('GET', src, true);
  762. xhr.onreadystatechange = function () {
  763. if (xhr.readyState !== 4) {
  764. return;
  765. }
  766. if (xhr.status < 400 && xhr.responseText) {
  767. code.textContent = xhr.responseText;
  768. Prism.highlightElement(code);
  769. return;
  770. }
  771. if (xhr.status === 404) {
  772. code.textContent = '✖ Error: File could not be found';
  773. return;
  774. }
  775. if (xhr.status >= 400) {
  776. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  777. return;
  778. }
  779. code.textContent = '✖ Error: An unknown error occurred';
  780. };
  781. xhr.send(null);
  782. });
  783. }
  784. const modalButtons = document.querySelectorAll("[data-modal]");
  785. const openedAsLocalFile = window.location.protocol === 'file:';
  786. if (modalButtons.length > 0 && openedAsLocalFile) {
  787. console.warn(
  788. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  789. 'browsers block XHR requests when a page is opened this way'
  790. );
  791. }
  792. modalButtons.forEach(function (trigger) {
  793. if (openedAsLocalFile) {
  794. trigger.setAttribute("hidden", "hidden");
  795. }
  796. trigger.addEventListener("click", function (event) {
  797. event.preventDefault();
  798. const modal = document.getElementById(trigger.dataset.modal);
  799. if (!modal) {
  800. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  801. return;
  802. }
  803. modal.classList.add("phpdocumentor-modal__open");
  804. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  805. const exits = modal.querySelectorAll("[data-exit-button]");
  806. exits.forEach(function (exit) {
  807. exit.addEventListener("click", function (event) {
  808. event.preventDefault();
  809. modal.classList.remove("phpdocumentor-modal__open");
  810. });
  811. });
  812. });
  813. });
  814. })();
  815. </script>
  816. </article>
  817. </section>
  818. <section class="phpdocumentor-on-this-page__sidebar">
  819. <section class="phpdocumentor-on-this-page__content">
  820. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  821. <ul class="phpdocumentor-list -clean">
  822. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  823. <li>
  824. <ul class="phpdocumentor-list -clean">
  825. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-constants">Constants</a></li>
  826. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-properties">Properties</a></li>
  827. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-methods">Methods</a></li>
  828. </ul>
  829. </li>
  830. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  831. <li>
  832. <ul class="phpdocumentor-list -clean">
  833. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE">DATAMODE</a></li>
  834. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_ENCODING">ENCODING</a></li>
  835. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET">GB2312_SUBSET</a></li>
  836. </ul>
  837. </li>
  838. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  839. <li>
  840. <ul class="phpdocumentor-list -clean">
  841. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data<a href="classes/chillerlan-QRCode-Data-Hanzi.html"></li>
  842. </ul>
  843. </li>
  844. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  845. <li>
  846. <ul class="phpdocumentor-list -clean">
  847. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a></li>
  848. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding">convertEncoding()</a></li>
  849. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment">decodeSegment()</a></li>
  850. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits">getLengthInBits()</a></li>
  851. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_validateString">validateString()</a></li>
  852. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write">write()</a></li>
  853. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount">getCharCount()</a></li>
  854. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a></li>
  855. </ul>
  856. </li>
  857. </ul>
  858. </section>
  859. </section>
  860. </div>
  861. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  862. <section class="phpdocumentor-search-results__dialog">
  863. <header class="phpdocumentor-search-results__header">
  864. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  865. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  866. </header>
  867. <section class="phpdocumentor-search-results__body">
  868. <ul class="phpdocumentor-search-results__entries"></ul>
  869. </section>
  870. </section>
  871. </section>
  872. </div>
  873. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  874. </main>
  875. <script>
  876. cssVars({});
  877. </script>
  878. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  879. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  880. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  881. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  882. </body>
  883. </html>