chillerlan-QRCode-Data-Hanzi.html 54 KB

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