chillerlan-QRCode-Data-Hanzi.html 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. </section>
  82. <section class="phpdocumentor-sidebar__category">
  83. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  84. <h4 class="phpdocumentor-sidebar__root-namespace">
  85. <a href="packages/Application.html" class="">Application</a>
  86. </h4>
  87. </section>
  88. <section class="phpdocumentor-sidebar__category">
  89. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  92. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  93. </section>
  94. <section class="phpdocumentor-sidebar__category">
  95. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  96. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  97. </section>
  98. </aside>
  99. <div class="phpdocumentor-column -nine phpdocumentor-content">
  100. <section>
  101. <ul class="phpdocumentor-breadcrumbs">
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  103. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  104. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-data.html">Data</a></li>
  105. </ul>
  106. <article class="phpdocumentor-element -class">
  107. <h2 class="phpdocumentor-content__title">
  108. Hanzi
  109. <span class="phpdocumentor-element__extends">
  110. extends <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeAbstract">QRDataModeAbstract</abbr></a>
  111. </span>
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">31</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">Hanzi (simplified Chinese) mode, GBT18284-2000: 13-bit double-byte characters from the GB2312/GB18030 character set</p>
  128. <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>
  129. </section>
  130. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  131. Tags
  132. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  133. </h5>
  134. <dl class="phpdocumentor-tag-list">
  135. <dt class="phpdocumentor-tag-list__entry">
  136. <span class="phpdocumentor-tag__name">see</span>
  137. </dt>
  138. <dd class="phpdocumentor-tag-list__definition">
  139. <span class="phpdocumentor-tag-link"><a href="https://en.wikipedia.org/wiki/GB_2312">https://en.wikipedia.org/wiki/GB_2312</a></span>
  140. </dd>
  141. <dt class="phpdocumentor-tag-list__entry">
  142. <span class="phpdocumentor-tag__name">see</span>
  143. </dt>
  144. <dd class="phpdocumentor-tag-list__definition">
  145. <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>
  146. </dd>
  147. <dt class="phpdocumentor-tag-list__entry">
  148. <span class="phpdocumentor-tag__name">see</span>
  149. </dt>
  150. <dd class="phpdocumentor-tag-list__definition">
  151. <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>
  152. </dd>
  153. <dt class="phpdocumentor-tag-list__entry">
  154. <span class="phpdocumentor-tag__name">see</span>
  155. </dt>
  156. <dd class="phpdocumentor-tag-list__definition">
  157. <span class="phpdocumentor-tag-link"><a href="https://gist.github.com/codemasher/91da33c44bfb48a81a6c1426bb8e4338">https://gist.github.com/codemasher/91da33c44bfb48a81a6c1426bb8e4338</a></span>
  158. </dd>
  159. <dt class="phpdocumentor-tag-list__entry">
  160. <span class="phpdocumentor-tag__name">see</span>
  161. </dt>
  162. <dd class="phpdocumentor-tag-list__definition">
  163. <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>
  164. </dd>
  165. <dt class="phpdocumentor-tag-list__entry">
  166. <span class="phpdocumentor-tag__name">see</span>
  167. </dt>
  168. <dd class="phpdocumentor-tag-list__definition">
  169. <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>
  170. </dd>
  171. </dl>
  172. <h3 id="toc">
  173. Table of Contents
  174. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  175. </h3>
  176. <h4 id="toc-constants">
  177. Constants
  178. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  179. </h4>
  180. <dl class="phpdocumentor-table-of-contents">
  181. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  182. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE">DATAMODE</a>
  183. <span>
  184. &nbsp;= \chillerlan\QRCode\Common\Mode::HANZI </span>
  185. </dt>
  186. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  187. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_ENCODING">ENCODING</a>
  188. <span>
  189. &nbsp;= &#039;GB18030&#039; </span>
  190. </dt>
  191. <dd>possible values: GB2312, GB18030</dd>
  192. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  193. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET">GB2312_SUBSET</a>
  194. <span>
  195. &nbsp;= 0b1 </span>
  196. </dt>
  197. </dl>
  198. <h4 id="toc-properties">
  199. Properties
  200. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  201. </h4>
  202. <dl class="phpdocumentor-table-of-contents">
  203. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  204. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data</a>
  205. <span>
  206. &nbsp;: string </span>
  207. </dt>
  208. <dd>The data to write</dd>
  209. </dl>
  210. <h4 id="toc-methods">
  211. Methods
  212. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  213. </h4>
  214. <dl class="phpdocumentor-table-of-contents">
  215. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  216. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a>
  217. <span>
  218. &nbsp;: mixed </span>
  219. </dt>
  220. <dd>QRDataModeAbstract constructor.</dd>
  221. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  222. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding">convertEncoding()</a>
  223. <span>
  224. &nbsp;: string </span>
  225. </dt>
  226. <dd>encoding conversion helper</dd>
  227. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  228. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment">decodeSegment()</a>
  229. <span>
  230. &nbsp;: string </span>
  231. </dt>
  232. <dd>See specification GBT 18284-2000</dd>
  233. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  234. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits">getLengthInBits()</a>
  235. <span>
  236. &nbsp;: int </span>
  237. </dt>
  238. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  239. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_validateString">validateString()</a>
  240. <span>
  241. &nbsp;: bool </span>
  242. </dt>
  243. <dd>checks if a string qualifies as Hanzi/GB2312</dd>
  244. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  245. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write">write()</a>
  246. <span>
  247. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a> </span>
  248. </dt>
  249. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  250. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount">getCharCount()</a>
  251. <span>
  252. &nbsp;: int </span>
  253. </dt>
  254. <dd>returns the character count of the $data string</dd>
  255. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  256. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a>
  257. <span>
  258. &nbsp;: int </span>
  259. </dt>
  260. <dd>shortcut</dd>
  261. </dl>
  262. <section class="phpdocumentor-constants">
  263. <h3 class="phpdocumentor-elements__header" id="constants">
  264. Constants
  265. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  266. </h3>
  267. <article class="phpdocumentor-element -constant -public ">
  268. <h4 class="phpdocumentor-element__name" id="constant_DATAMODE">
  269. DATAMODE
  270. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE" class="headerlink"><i class="fas fa-link"></i></a>
  271. </h4>
  272. <aside class="phpdocumentor-element-found-in">
  273. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Hanzi.php"><a href="files/src-data-hanzi.html"><abbr title="src/Data/Hanzi.php">Hanzi.php</abbr></a></abbr>
  274. :
  275. <span class="phpdocumentor-element-found-in__line">50</span>
  276. </aside>
  277. <code class="phpdocumentor-signature phpdocumentor-code ">
  278. <span class="phpdocumentor-signature__visibility">public</span>
  279. <span class="phpdocumentor-signature__type">mixed</span>
  280. <span class="phpdocumentor-signature__name">DATAMODE</span>
  281. = <span class="phpdocumentor-signature__default-value">\chillerlan\QRCode\Common\Mode::HANZI</span>
  282. </code>
  283. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  284. Tags
  285. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE#tags" class="headerlink"><i class="fas fa-link"></i></a>
  286. </h5>
  287. <dl class="phpdocumentor-tag-list">
  288. <dt class="phpdocumentor-tag-list__entry">
  289. <span class="phpdocumentor-tag__name">inheritDoc</span>
  290. </dt>
  291. <dd class="phpdocumentor-tag-list__definition">
  292. </dd>
  293. </dl>
  294. </article>
  295. <article class="phpdocumentor-element -constant -public ">
  296. <h4 class="phpdocumentor-element__name" id="constant_ENCODING">
  297. ENCODING
  298. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_ENCODING" class="headerlink"><i class="fas fa-link"></i></a>
  299. </h4>
  300. <aside class="phpdocumentor-element-found-in">
  301. <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>
  302. :
  303. <span class="phpdocumentor-element-found-in__line">38</span>
  304. </aside>
  305. <p class="phpdocumentor-summary">possible values: GB2312, GB18030</p>
  306. <code class="phpdocumentor-signature phpdocumentor-code ">
  307. <span class="phpdocumentor-signature__visibility">public</span>
  308. <span class="phpdocumentor-signature__type">string</span>
  309. <span class="phpdocumentor-signature__name">ENCODING</span>
  310. = <span class="phpdocumentor-signature__default-value">&#039;GB18030&#039;</span>
  311. </code>
  312. </article>
  313. <article class="phpdocumentor-element -constant -public ">
  314. <h4 class="phpdocumentor-element__name" id="constant_GB2312_SUBSET">
  315. GB2312_SUBSET
  316. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET" class="headerlink"><i class="fas fa-link"></i></a>
  317. </h4>
  318. <aside class="phpdocumentor-element-found-in">
  319. <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>
  320. :
  321. <span class="phpdocumentor-element-found-in__line">45</span>
  322. </aside>
  323. <code class="phpdocumentor-signature phpdocumentor-code ">
  324. <span class="phpdocumentor-signature__visibility">public</span>
  325. <span class="phpdocumentor-signature__type">int</span>
  326. <span class="phpdocumentor-signature__name">GB2312_SUBSET</span>
  327. = <span class="phpdocumentor-signature__default-value">0b1</span>
  328. </code>
  329. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  330. Tags
  331. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET#tags" class="headerlink"><i class="fas fa-link"></i></a>
  332. </h5>
  333. <dl class="phpdocumentor-tag-list">
  334. <dt class="phpdocumentor-tag-list__entry">
  335. <span class="phpdocumentor-tag__name">todo:</span>
  336. </dt>
  337. <dd class="phpdocumentor-tag-list__definition">
  338. <section class="phpdocumentor-description"><p>other subsets???</p>
  339. </section>
  340. </dd>
  341. </dl>
  342. </article>
  343. </section>
  344. <section class="phpdocumentor-properties">
  345. <h3 class="phpdocumentor-elements__header" id="properties">
  346. Properties
  347. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  348. </h3>
  349. <article
  350. class="
  351. phpdocumentor-element
  352. -property
  353. -protected
  354. "
  355. >
  356. <h4 class="phpdocumentor-element__name" id="property_data">
  357. $data
  358. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data" class="headerlink"><i class="fas fa-link"></i></a>
  359. <span class="phpdocumentor-element__modifiers">
  360. </span>
  361. </h4>
  362. <aside class="phpdocumentor-element-found-in">
  363. <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>
  364. :
  365. <span class="phpdocumentor-element-found-in__line">23</span>
  366. </aside>
  367. <p class="phpdocumentor-summary">The data to write</p>
  368. <code class="phpdocumentor-code phpdocumentor-signature ">
  369. <span class="phpdocumentor-signature__visibility">protected</span>
  370. <span class="phpdocumentor-signature__type">string</span>
  371. <span class="phpdocumentor-signature__name">$data</span>
  372. </code>
  373. </article>
  374. </section>
  375. <section class="phpdocumentor-methods">
  376. <h3 class="phpdocumentor-elements__header" id="methods">
  377. Methods
  378. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  379. </h3>
  380. <article
  381. class="phpdocumentor-element
  382. -method
  383. -public
  384. "
  385. >
  386. <h4 class="phpdocumentor-element__name" id="method___construct">
  387. __construct()
  388. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  389. </h4>
  390. <aside class="phpdocumentor-element-found-in">
  391. <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>
  392. :
  393. <span class="phpdocumentor-element-found-in__line">30</span>
  394. </aside>
  395. <p class="phpdocumentor-summary">QRDataModeAbstract constructor.</p>
  396. <code class="phpdocumentor-code phpdocumentor-signature ">
  397. <span class="phpdocumentor-signature__visibility">public</span>
  398. <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>
  399. <div class="phpdocumentor-label-line">
  400. </div>
  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">$data</span>
  405. : <span class="phpdocumentor-signature__argument__return-type">string</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-Data-QRDataModeAbstract.html#method___construct#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"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  420. </dd>
  421. </dl>
  422. </article>
  423. <article
  424. class="phpdocumentor-element
  425. -method
  426. -public
  427. -static "
  428. >
  429. <h4 class="phpdocumentor-element__name" id="method_convertEncoding">
  430. convertEncoding()
  431. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding" class="headerlink"><i class="fas fa-link"></i></a>
  432. </h4>
  433. <aside class="phpdocumentor-element-found-in">
  434. <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>
  435. :
  436. <span class="phpdocumentor-element-found-in__line">69</span>
  437. </aside>
  438. <p class="phpdocumentor-summary">encoding conversion helper</p>
  439. <code class="phpdocumentor-code phpdocumentor-signature ">
  440. <span class="phpdocumentor-signature__visibility">public</span>
  441. <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>
  442. <div class="phpdocumentor-label-line">
  443. </div>
  444. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  445. <dl class="phpdocumentor-argument-list">
  446. <dt class="phpdocumentor-argument-list__entry">
  447. <span class="phpdocumentor-signature__argument__name">$string</span>
  448. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  449. </dt>
  450. <dd class="phpdocumentor-argument-list__definition">
  451. </dd>
  452. </dl>
  453. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  454. Tags
  455. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding#tags" class="headerlink"><i class="fas fa-link"></i></a>
  456. </h5>
  457. <dl class="phpdocumentor-tag-list">
  458. <dt class="phpdocumentor-tag-list__entry">
  459. <span class="phpdocumentor-tag__name">inheritDoc</span>
  460. </dt>
  461. <dd class="phpdocumentor-tag-list__definition">
  462. </dd>
  463. </dl>
  464. <section>
  465. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  466. <span class="phpdocumentor-signature__response_type">string</span>
  467. </section>
  468. </article>
  469. <article
  470. class="phpdocumentor-element
  471. -method
  472. -public
  473. -static "
  474. >
  475. <h4 class="phpdocumentor-element__name" id="method_decodeSegment">
  476. decodeSegment()
  477. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment" class="headerlink"><i class="fas fa-link"></i></a>
  478. </h4>
  479. <aside class="phpdocumentor-element-found-in">
  480. <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>
  481. :
  482. <span class="phpdocumentor-element-found-in__line">171</span>
  483. </aside>
  484. <p class="phpdocumentor-summary">See specification GBT 18284-2000</p>
  485. <code class="phpdocumentor-code phpdocumentor-signature ">
  486. <span class="phpdocumentor-signature__visibility">public</span>
  487. <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>
  488. <div class="phpdocumentor-label-line">
  489. </div>
  490. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  491. <dl class="phpdocumentor-argument-list">
  492. <dt class="phpdocumentor-argument-list__entry">
  493. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  494. : <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>
  495. </dt>
  496. <dd class="phpdocumentor-argument-list__definition">
  497. </dd>
  498. <dt class="phpdocumentor-argument-list__entry">
  499. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  500. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  501. </dt>
  502. <dd class="phpdocumentor-argument-list__definition">
  503. </dd>
  504. </dl>
  505. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  506. Tags
  507. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment#tags" class="headerlink"><i class="fas fa-link"></i></a>
  508. </h5>
  509. <dl class="phpdocumentor-tag-list">
  510. <dt class="phpdocumentor-tag-list__entry">
  511. <span class="phpdocumentor-tag__name">throws</span>
  512. </dt>
  513. <dd class="phpdocumentor-tag-list__definition">
  514. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  515. </dd>
  516. </dl>
  517. <section>
  518. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  519. <span class="phpdocumentor-signature__response_type">string</span>
  520. </section>
  521. </article>
  522. <article
  523. class="phpdocumentor-element
  524. -method
  525. -public
  526. "
  527. >
  528. <h4 class="phpdocumentor-element__name" id="method_getLengthInBits">
  529. getLengthInBits()
  530. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits" class="headerlink"><i class="fas fa-link"></i></a>
  531. </h4>
  532. <aside class="phpdocumentor-element-found-in">
  533. <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>
  534. :
  535. <span class="phpdocumentor-element-found-in__line">62</span>
  536. </aside>
  537. <code class="phpdocumentor-code phpdocumentor-signature ">
  538. <span class="phpdocumentor-signature__visibility">public</span>
  539. <span class="phpdocumentor-signature__name">getLengthInBits</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  540. <div class="phpdocumentor-label-line">
  541. </div>
  542. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  543. Tags
  544. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits#tags" class="headerlink"><i class="fas fa-link"></i></a>
  545. </h5>
  546. <dl class="phpdocumentor-tag-list">
  547. <dt class="phpdocumentor-tag-list__entry">
  548. <span class="phpdocumentor-tag__name">inheritDoc</span>
  549. </dt>
  550. <dd class="phpdocumentor-tag-list__definition">
  551. </dd>
  552. </dl>
  553. <section>
  554. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  555. <span class="phpdocumentor-signature__response_type">int</span>
  556. </section>
  557. </article>
  558. <article
  559. class="phpdocumentor-element
  560. -method
  561. -public
  562. -static "
  563. >
  564. <h4 class="phpdocumentor-element__name" id="method_validateString">
  565. validateString()
  566. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_validateString" class="headerlink"><i class="fas fa-link"></i></a>
  567. </h4>
  568. <aside class="phpdocumentor-element-found-in">
  569. <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>
  570. :
  571. <span class="phpdocumentor-element-found-in__line">94</span>
  572. </aside>
  573. <p class="phpdocumentor-summary">checks if a string qualifies as Hanzi/GB2312</p>
  574. <code class="phpdocumentor-code phpdocumentor-signature ">
  575. <span class="phpdocumentor-signature__visibility">public</span>
  576. <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>
  577. <div class="phpdocumentor-label-line">
  578. </div>
  579. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  580. <dl class="phpdocumentor-argument-list">
  581. <dt class="phpdocumentor-argument-list__entry">
  582. <span class="phpdocumentor-signature__argument__name">$string</span>
  583. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  584. </dt>
  585. <dd class="phpdocumentor-argument-list__definition">
  586. </dd>
  587. </dl>
  588. <section>
  589. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  590. <span class="phpdocumentor-signature__response_type">bool</span>
  591. </section>
  592. </article>
  593. <article
  594. class="phpdocumentor-element
  595. -method
  596. -public
  597. "
  598. >
  599. <h4 class="phpdocumentor-element__name" id="method_write">
  600. write()
  601. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write" class="headerlink"><i class="fas fa-link"></i></a>
  602. </h4>
  603. <aside class="phpdocumentor-element-found-in">
  604. <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>
  605. :
  606. <span class="phpdocumentor-element-found-in__line">133</span>
  607. </aside>
  608. <code class="phpdocumentor-code phpdocumentor-signature ">
  609. <span class="phpdocumentor-signature__visibility">public</span>
  610. <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"><a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a></span></code>
  611. <div class="phpdocumentor-label-line">
  612. </div>
  613. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  614. <dl class="phpdocumentor-argument-list">
  615. <dt class="phpdocumentor-argument-list__entry">
  616. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  617. : <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>
  618. </dt>
  619. <dd class="phpdocumentor-argument-list__definition">
  620. </dd>
  621. <dt class="phpdocumentor-argument-list__entry">
  622. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  623. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  624. </dt>
  625. <dd class="phpdocumentor-argument-list__definition">
  626. </dd>
  627. </dl>
  628. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  629. Tags
  630. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write#tags" class="headerlink"><i class="fas fa-link"></i></a>
  631. </h5>
  632. <dl class="phpdocumentor-tag-list">
  633. <dt class="phpdocumentor-tag-list__entry">
  634. <span class="phpdocumentor-tag__name">inheritDoc</span>
  635. </dt>
  636. <dd class="phpdocumentor-tag-list__definition">
  637. </dd>
  638. <dt class="phpdocumentor-tag-list__entry">
  639. <span class="phpdocumentor-tag__name">throws</span>
  640. </dt>
  641. <dd class="phpdocumentor-tag-list__definition">
  642. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  643. <section class="phpdocumentor-description"><p>on an illegal character occurence</p>
  644. </section>
  645. </dd>
  646. </dl>
  647. <section>
  648. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  649. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a></span>
  650. </section>
  651. </article>
  652. <article
  653. class="phpdocumentor-element
  654. -method
  655. -protected
  656. "
  657. >
  658. <h4 class="phpdocumentor-element__name" id="method_getCharCount">
  659. getCharCount()
  660. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount" class="headerlink"><i class="fas fa-link"></i></a>
  661. </h4>
  662. <aside class="phpdocumentor-element-found-in">
  663. <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>
  664. :
  665. <span class="phpdocumentor-element-found-in__line">55</span>
  666. </aside>
  667. <p class="phpdocumentor-summary">returns the character count of the $data string</p>
  668. <code class="phpdocumentor-code phpdocumentor-signature ">
  669. <span class="phpdocumentor-signature__visibility">protected</span>
  670. <span class="phpdocumentor-signature__name">getCharCount</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  671. <div class="phpdocumentor-label-line">
  672. </div>
  673. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  674. Tags
  675. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount#tags" class="headerlink"><i class="fas fa-link"></i></a>
  676. </h5>
  677. <dl class="phpdocumentor-tag-list">
  678. <dt class="phpdocumentor-tag-list__entry">
  679. <span class="phpdocumentor-tag__name">inheritDoc</span>
  680. </dt>
  681. <dd class="phpdocumentor-tag-list__definition">
  682. </dd>
  683. </dl>
  684. <section>
  685. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  686. <span class="phpdocumentor-signature__response_type">int</span>
  687. </section>
  688. </article>
  689. <article
  690. class="phpdocumentor-element
  691. -method
  692. -protected
  693. -static "
  694. >
  695. <h4 class="phpdocumentor-element__name" id="method_getLengthBits">
  696. getLengthBits()
  697. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits" class="headerlink"><i class="fas fa-link"></i></a>
  698. </h4>
  699. <aside class="phpdocumentor-element-found-in">
  700. <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>
  701. :
  702. <span class="phpdocumentor-element-found-in__line">57</span>
  703. </aside>
  704. <p class="phpdocumentor-summary">shortcut</p>
  705. <code class="phpdocumentor-code phpdocumentor-signature ">
  706. <span class="phpdocumentor-signature__visibility">protected</span>
  707. <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>
  708. <div class="phpdocumentor-label-line">
  709. </div>
  710. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  711. <dl class="phpdocumentor-argument-list">
  712. <dt class="phpdocumentor-argument-list__entry">
  713. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  714. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  715. </dt>
  716. <dd class="phpdocumentor-argument-list__definition">
  717. </dd>
  718. </dl>
  719. <section>
  720. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  721. <span class="phpdocumentor-signature__response_type">int</span>
  722. </section>
  723. </article>
  724. </section>
  725. <div class="phpdocumentor-modal" id="source-view">
  726. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  727. <div class="phpdocumentor-modal-container">
  728. <div class="phpdocumentor-modal-content">
  729. <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>
  730. </div>
  731. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  732. </div>
  733. </div>
  734. <script type="text/javascript">
  735. (function () {
  736. function loadExternalCodeSnippet(el, url, line) {
  737. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  738. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  739. const language = 'php';
  740. const code = document.createElement('code');
  741. code.className = 'language-' + language;
  742. pre.textContent = '';
  743. pre.setAttribute('data-line', line)
  744. code.textContent = 'Loading…';
  745. pre.appendChild(code);
  746. var xhr = new XMLHttpRequest();
  747. xhr.open('GET', src, true);
  748. xhr.onreadystatechange = function () {
  749. if (xhr.readyState !== 4) {
  750. return;
  751. }
  752. if (xhr.status < 400 && xhr.responseText) {
  753. code.textContent = xhr.responseText;
  754. Prism.highlightElement(code);
  755. return;
  756. }
  757. if (xhr.status === 404) {
  758. code.textContent = '✖ Error: File could not be found';
  759. return;
  760. }
  761. if (xhr.status >= 400) {
  762. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  763. return;
  764. }
  765. code.textContent = '✖ Error: An unknown error occurred';
  766. };
  767. xhr.send(null);
  768. });
  769. }
  770. const modalButtons = document.querySelectorAll("[data-modal]");
  771. const openedAsLocalFile = window.location.protocol === 'file:';
  772. if (modalButtons.length > 0 && openedAsLocalFile) {
  773. console.warn(
  774. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  775. 'browsers block XHR requests when a page is opened this way'
  776. );
  777. }
  778. modalButtons.forEach(function (trigger) {
  779. if (openedAsLocalFile) {
  780. trigger.setAttribute("hidden", "hidden");
  781. }
  782. trigger.addEventListener("click", function (event) {
  783. event.preventDefault();
  784. const modal = document.getElementById(trigger.dataset.modal);
  785. if (!modal) {
  786. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  787. return;
  788. }
  789. modal.classList.add("phpdocumentor-modal__open");
  790. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  791. const exits = modal.querySelectorAll("[data-exit-button]");
  792. exits.forEach(function (exit) {
  793. exit.addEventListener("click", function (event) {
  794. event.preventDefault();
  795. modal.classList.remove("phpdocumentor-modal__open");
  796. });
  797. });
  798. });
  799. });
  800. })();
  801. </script>
  802. </article>
  803. </section>
  804. <section class="phpdocumentor-on-this-page__sidebar">
  805. <section class="phpdocumentor-on-this-page__content">
  806. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  807. <ul class="phpdocumentor-list -clean">
  808. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  809. <li>
  810. <ul class="phpdocumentor-list -clean">
  811. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-constants">Constants</a></li>
  812. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-properties">Properties</a></li>
  813. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#toc-methods">Methods</a></li>
  814. </ul>
  815. </li>
  816. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  817. <li>
  818. <ul class="phpdocumentor-list -clean">
  819. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_DATAMODE">DATAMODE</a></li>
  820. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_ENCODING">ENCODING</a></li>
  821. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#constant_GB2312_SUBSET">GB2312_SUBSET</a></li>
  822. </ul>
  823. </li>
  824. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  825. <li>
  826. <ul class="phpdocumentor-list -clean">
  827. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data<a href="classes/chillerlan-QRCode-Data-Hanzi.html"></li>
  828. </ul>
  829. </li>
  830. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  831. <li>
  832. <ul class="phpdocumentor-list -clean">
  833. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a></li>
  834. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_convertEncoding">convertEncoding()</a></li>
  835. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_decodeSegment">decodeSegment()</a></li>
  836. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getLengthInBits">getLengthInBits()</a></li>
  837. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_validateString">validateString()</a></li>
  838. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_write">write()</a></li>
  839. <li><a href="classes/chillerlan-QRCode-Data-Hanzi.html#method_getCharCount">getCharCount()</a></li>
  840. <li><a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a></li>
  841. </ul>
  842. </li>
  843. </ul>
  844. </section>
  845. </section>
  846. </div>
  847. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  848. <section class="phpdocumentor-search-results__dialog">
  849. <header class="phpdocumentor-search-results__header">
  850. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  851. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  852. </header>
  853. <section class="phpdocumentor-search-results__body">
  854. <ul class="phpdocumentor-search-results__entries"></ul>
  855. </section>
  856. </section>
  857. </section>
  858. </div>
  859. <a href="classes/chillerlan-QRCode-Data-Hanzi.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  860. </main>
  861. <script>
  862. cssVars({});
  863. </script>
  864. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  865. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  866. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  867. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  868. </body>
  869. </html>