chillerlan-QRCode-Data-Kanji.html 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970
  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=Source+Sans+Pro:wght@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/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace">
  56. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  57. </h4>
  58. <ul class="phpdocumentor-list">
  59. <li>
  60. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  61. </li>
  62. <li>
  63. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  64. </li>
  65. </ul>
  66. </section>
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="packages/Application.html" class="">Application</a>
  71. </h4>
  72. </section>
  73. <section class="phpdocumentor-sidebar__category">
  74. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  75. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  76. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  78. </section>
  79. <section class="phpdocumentor-sidebar__category">
  80. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  81. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  82. </section>
  83. </aside>
  84. <div class="phpdocumentor-column -eight phpdocumentor-content">
  85. <ul class="phpdocumentor-breadcrumbs">
  86. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  87. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  88. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-data.html">Data</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. Kanji
  93. <span class="phpdocumentor-element__extends">
  94. extends <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeAbstract">QRDataModeAbstract</abbr></a>
  95. </span>
  96. <div class="phpdocumentor-element__package">
  97. in package
  98. <ul class="phpdocumentor-breadcrumbs">
  99. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  100. </ul>
  101. </div>
  102. </h2>
  103. <aside class="phpdocumentor-element-found-in">
  104. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  105. :
  106. <span class="phpdocumentor-element-found-in__line">29</span>
  107. </aside>
  108. <p class="phpdocumentor-summary">Kanji mode: 13-bit double-byte characters from the Shift-JIS character set</p>
  109. <section class="phpdocumentor-description"><p>ISO/IEC 18004:2000 Section 8.3.5
  110. ISO/IEC 18004:2000 Section 8.4.5</p>
  111. </section>
  112. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  113. Tags
  114. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  115. </h5>
  116. <dl class="phpdocumentor-tag-list">
  117. <dt class="phpdocumentor-tag-list__entry">
  118. <span class="phpdocumentor-tag__name">see</span>
  119. </dt>
  120. <dd class="phpdocumentor-tag-list__definition">
  121. <span class="phpdocumentor-tag-link"><a href="https://en.wikipedia.org/wiki/Shift_JIS#As_defined_in_JIS_X_0208:1997"><abbr title="https://en.wikipedia.org/wiki/Shift_JIS#As_defined_in_JIS_X_0208:1997">https://en.wikipedia.org/wiki/Shift_JIS#As_defined_in_JIS_X_0208:1997</abbr></a></span>
  122. </dd>
  123. <dt class="phpdocumentor-tag-list__entry">
  124. <span class="phpdocumentor-tag__name">see</span>
  125. </dt>
  126. <dd class="phpdocumentor-tag-list__definition">
  127. <span class="phpdocumentor-tag-link"><a href="http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml"><abbr title="http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml">http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml</abbr></a></span>
  128. </dd>
  129. <dt class="phpdocumentor-tag-list__entry">
  130. <span class="phpdocumentor-tag__name">see</span>
  131. </dt>
  132. <dd class="phpdocumentor-tag-list__definition">
  133. <span class="phpdocumentor-tag-link"><a href="https://gist.github.com/codemasher/d07d3e6e9346c08e7a41b8b978784952"><abbr title="https://gist.github.com/codemasher/d07d3e6e9346c08e7a41b8b978784952">https://gist.github.com/codemasher/d07d3e6e9346c08e7a41b8b978784952</abbr></a></span>
  134. </dd>
  135. </dl>
  136. <h3 id="toc">
  137. Table of Contents
  138. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  139. </h3>
  140. <dl class="phpdocumentor-table-of-contents">
  141. <dt class="phpdocumentor-table-of-contents__entry -constant -public">
  142. <a href="classes/chillerlan-QRCode-Data-Kanji.html#constant_ENCODING">ENCODING</a>
  143. <span>
  144. &nbsp;= &#039;SJIS&#039; </span>
  145. </dt>
  146. <dd></dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  148. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data">$data</a>
  149. <span>
  150. &nbsp;: string </span>
  151. </dt>
  152. <dd>The data to write</dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  154. <a href="classes/chillerlan-QRCode-Data-Kanji.html#property_datamode">$datamode</a>
  155. <span>
  156. &nbsp;: int </span>
  157. </dt>
  158. <dd>the current data mode: Num, Alphanum, Kanji, Hanzi, Byte</dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct">__construct()</a>
  161. <span>
  162. &nbsp;: mixed </span>
  163. </dt>
  164. <dd>QRDataModeAbstract constructor.</dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_convertEncoding">convertEncoding()</a>
  167. <span>
  168. &nbsp;: string </span>
  169. </dt>
  170. <dd>encoding conversion helper</dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  172. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_decodeSegment">decodeSegment()</a>
  173. <span>
  174. &nbsp;: string </span>
  175. </dt>
  176. <dd></dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  178. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getDataMode">getDataMode()</a>
  179. <span>
  180. &nbsp;: int </span>
  181. </dt>
  182. <dd>returns the current data mode constant</dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  184. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_getLengthInBits">getLengthInBits()</a>
  185. <span>
  186. &nbsp;: int </span>
  187. </dt>
  188. <dd></dd>
  189. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  190. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_validateString">validateString()</a>
  191. <span>
  192. &nbsp;: bool </span>
  193. </dt>
  194. <dd>checks if a string qualifies as SJIS Kanji</dd>
  195. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  196. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_write">write()</a>
  197. <span>
  198. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a> </span>
  199. </dt>
  200. <dd></dd>
  201. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  202. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_getCharCount">getCharCount()</a>
  203. <span>
  204. &nbsp;: int </span>
  205. </dt>
  206. <dd>returns the character count of the $data string</dd>
  207. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  208. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits">getLengthBits()</a>
  209. <span>
  210. &nbsp;: int </span>
  211. </dt>
  212. <dd>shortcut</dd>
  213. </dl>
  214. <section class="phpdocumentor-constants">
  215. <h3 class="phpdocumentor-elements__header" id="constants">
  216. Constants
  217. <a href="classes/chillerlan-QRCode-Data-Kanji.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  218. </h3>
  219. <article class="phpdocumentor-element -constant -public ">
  220. <h4 class="phpdocumentor-element__name" id="constant_ENCODING">
  221. ENCODING
  222. <a href="classes/chillerlan-QRCode-Data-Kanji.html#constant_ENCODING" class="headerlink"><i class="fas fa-link"></i></a>
  223. </h4>
  224. <aside class="phpdocumentor-element-found-in">
  225. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  226. :
  227. <span class="phpdocumentor-element-found-in__line">33</span>
  228. </aside>
  229. <code class="phpdocumentor-signature phpdocumentor-code ">
  230. <span class="phpdocumentor-signature__visibility">public</span>
  231. <span class="phpdocumentor-signature__type">mixed</span>
  232. <span class="phpdocumentor-signature__name">ENCODING</span>
  233. = <span class="phpdocumentor-signature__default-value">&#039;SJIS&#039;</span>
  234. </code>
  235. <section class="phpdocumentor-description"></section>
  236. <section class="phpdocumentor-description"></section>
  237. </article>
  238. </section>
  239. <section class="phpdocumentor-properties">
  240. <h3 class="phpdocumentor-elements__header" id="properties">
  241. Properties
  242. <a href="classes/chillerlan-QRCode-Data-Kanji.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  243. </h3>
  244. <article
  245. class="
  246. phpdocumentor-element
  247. -property
  248. -protected
  249. "
  250. >
  251. <h4 class="phpdocumentor-element__name" id="property_data">
  252. $data
  253. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#property_data" class="headerlink"><i class="fas fa-link"></i></a>
  254. <span class="phpdocumentor-element__modifiers">
  255. </span>
  256. </h4>
  257. <aside class="phpdocumentor-element-found-in">
  258. <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>
  259. :
  260. <span class="phpdocumentor-element-found-in__line">28</span>
  261. </aside>
  262. <p class="phpdocumentor-summary">The data to write</p>
  263. <code class="phpdocumentor-code phpdocumentor-signature ">
  264. <span class="phpdocumentor-signature__visibility">protected</span>
  265. <span class="phpdocumentor-signature__type">string</span>
  266. <span class="phpdocumentor-signature__name">$data</span>
  267. </code>
  268. <section class="phpdocumentor-description"></section>
  269. </article>
  270. <article
  271. class="
  272. phpdocumentor-element
  273. -property
  274. -protected
  275. -static "
  276. >
  277. <h4 class="phpdocumentor-element__name" id="property_datamode">
  278. $datamode
  279. <a href="classes/chillerlan-QRCode-Data-Kanji.html#property_datamode" class="headerlink"><i class="fas fa-link"></i></a>
  280. <span class="phpdocumentor-element__modifiers">
  281. </span>
  282. </h4>
  283. <aside class="phpdocumentor-element-found-in">
  284. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  285. :
  286. <span class="phpdocumentor-element-found-in__line">38</span>
  287. </aside>
  288. <p class="phpdocumentor-summary">the current data mode: Num, Alphanum, Kanji, Hanzi, Byte</p>
  289. <code class="phpdocumentor-code phpdocumentor-signature ">
  290. <span class="phpdocumentor-signature__visibility">protected</span>
  291. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__type">int</span>
  292. <span class="phpdocumentor-signature__name">$datamode</span>
  293. = <span class="phpdocumentor-signature__default-value">\chillerlan\QRCode\Common\Mode::KANJI</span></code>
  294. <section class="phpdocumentor-description"></section>
  295. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  296. Tags
  297. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  298. </h5>
  299. <dl class="phpdocumentor-tag-list">
  300. <dt class="phpdocumentor-tag-list__entry">
  301. <span class="phpdocumentor-tag__name">inheritDoc</span>
  302. </dt>
  303. <dd class="phpdocumentor-tag-list__definition">
  304. </dd>
  305. </dl>
  306. </article>
  307. </section>
  308. <section class="phpdocumentor-methods">
  309. <h3 class="phpdocumentor-elements__header" id="methods">
  310. Methods
  311. <a href="classes/chillerlan-QRCode-Data-Kanji.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  312. </h3>
  313. <article
  314. class="phpdocumentor-element
  315. -method
  316. -public
  317. "
  318. >
  319. <h4 class="phpdocumentor-element__name" id="method___construct">
  320. __construct()
  321. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  322. </h4>
  323. <aside class="phpdocumentor-element-found-in">
  324. <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>
  325. :
  326. <span class="phpdocumentor-element-found-in__line">35</span>
  327. </aside>
  328. <p class="phpdocumentor-summary">QRDataModeAbstract constructor.</p>
  329. <code class="phpdocumentor-code phpdocumentor-signature ">
  330. <span class="phpdocumentor-signature__visibility">public</span>
  331. <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>
  332. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  333. <dl class="phpdocumentor-argument-list">
  334. <dt class="phpdocumentor-argument-list__entry">
  335. <span class="phpdocumentor-signature__argument__name">$data</span>
  336. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  337. </dt>
  338. <dd class="phpdocumentor-argument-list__definition">
  339. <section class="phpdocumentor-description"></section>
  340. </dd>
  341. </dl>
  342. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  343. Tags
  344. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  345. </h5>
  346. <dl class="phpdocumentor-tag-list">
  347. <dt class="phpdocumentor-tag-list__entry">
  348. <span class="phpdocumentor-tag__name">throws</span>
  349. </dt>
  350. <dd class="phpdocumentor-tag-list__definition">
  351. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  352. </dd>
  353. </dl>
  354. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  355. <span class="phpdocumentor-signature__response_type">mixed</span>
  356. &mdash;
  357. </article>
  358. <article
  359. class="phpdocumentor-element
  360. -method
  361. -public
  362. -static "
  363. >
  364. <h4 class="phpdocumentor-element__name" id="method_convertEncoding">
  365. convertEncoding()
  366. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_convertEncoding" class="headerlink"><i class="fas fa-link"></i></a>
  367. </h4>
  368. <aside class="phpdocumentor-element-found-in">
  369. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  370. :
  371. <span class="phpdocumentor-element-found-in__line">57</span>
  372. </aside>
  373. <p class="phpdocumentor-summary">encoding conversion helper</p>
  374. <code class="phpdocumentor-code phpdocumentor-signature ">
  375. <span class="phpdocumentor-signature__visibility">public</span>
  376. <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>
  377. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  378. <dl class="phpdocumentor-argument-list">
  379. <dt class="phpdocumentor-argument-list__entry">
  380. <span class="phpdocumentor-signature__argument__name">$string</span>
  381. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  382. </dt>
  383. <dd class="phpdocumentor-argument-list__definition">
  384. <section class="phpdocumentor-description"></section>
  385. </dd>
  386. </dl>
  387. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  388. Tags
  389. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  390. </h5>
  391. <dl class="phpdocumentor-tag-list">
  392. <dt class="phpdocumentor-tag-list__entry">
  393. <span class="phpdocumentor-tag__name">inheritDoc</span>
  394. </dt>
  395. <dd class="phpdocumentor-tag-list__definition">
  396. </dd>
  397. </dl>
  398. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  399. <span class="phpdocumentor-signature__response_type">string</span>
  400. &mdash;
  401. </article>
  402. <article
  403. class="phpdocumentor-element
  404. -method
  405. -public
  406. -static "
  407. >
  408. <h4 class="phpdocumentor-element__name" id="method_decodeSegment">
  409. decodeSegment()
  410. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_decodeSegment" class="headerlink"><i class="fas fa-link"></i></a>
  411. </h4>
  412. <aside class="phpdocumentor-element-found-in">
  413. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  414. :
  415. <span class="phpdocumentor-element-found-in__line">158</span>
  416. </aside>
  417. <code class="phpdocumentor-code phpdocumentor-signature ">
  418. <span class="phpdocumentor-signature__visibility">public</span>
  419. <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>
  420. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  421. <dl class="phpdocumentor-argument-list">
  422. <dt class="phpdocumentor-argument-list__entry">
  423. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  424. : <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>
  425. </dt>
  426. <dd class="phpdocumentor-argument-list__definition">
  427. <section class="phpdocumentor-description"></section>
  428. </dd>
  429. <dt class="phpdocumentor-argument-list__entry">
  430. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  431. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  432. </dt>
  433. <dd class="phpdocumentor-argument-list__definition">
  434. <section class="phpdocumentor-description"></section>
  435. </dd>
  436. </dl>
  437. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  438. Tags
  439. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  440. </h5>
  441. <dl class="phpdocumentor-tag-list">
  442. <dt class="phpdocumentor-tag-list__entry">
  443. <span class="phpdocumentor-tag__name">inheritDoc</span>
  444. </dt>
  445. <dd class="phpdocumentor-tag-list__definition">
  446. </dd>
  447. <dt class="phpdocumentor-tag-list__entry">
  448. <span class="phpdocumentor-tag__name">throws</span>
  449. </dt>
  450. <dd class="phpdocumentor-tag-list__definition">
  451. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  452. </dd>
  453. </dl>
  454. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  455. <span class="phpdocumentor-signature__response_type">string</span>
  456. &mdash;
  457. </article>
  458. <article
  459. class="phpdocumentor-element
  460. -method
  461. -public
  462. "
  463. >
  464. <h4 class="phpdocumentor-element__name" id="method_getDataMode">
  465. getDataMode()
  466. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getDataMode" class="headerlink"><i class="fas fa-link"></i></a>
  467. </h4>
  468. <aside class="phpdocumentor-element-found-in">
  469. <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>
  470. :
  471. <span class="phpdocumentor-element-found-in__line">55</span>
  472. </aside>
  473. <p class="phpdocumentor-summary">returns the current data mode constant</p>
  474. <code class="phpdocumentor-code phpdocumentor-signature ">
  475. <span class="phpdocumentor-signature__visibility">public</span>
  476. <span class="phpdocumentor-signature__name">getDataMode</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  477. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  478. Tags
  479. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  480. </h5>
  481. <dl class="phpdocumentor-tag-list">
  482. <dt class="phpdocumentor-tag-list__entry">
  483. <span class="phpdocumentor-tag__name">inheritDoc</span>
  484. </dt>
  485. <dd class="phpdocumentor-tag-list__definition">
  486. </dd>
  487. </dl>
  488. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  489. <span class="phpdocumentor-signature__response_type">int</span>
  490. &mdash;
  491. </article>
  492. <article
  493. class="phpdocumentor-element
  494. -method
  495. -public
  496. "
  497. >
  498. <h4 class="phpdocumentor-element__name" id="method_getLengthInBits">
  499. getLengthInBits()
  500. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_getLengthInBits" class="headerlink"><i class="fas fa-link"></i></a>
  501. </h4>
  502. <aside class="phpdocumentor-element-found-in">
  503. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  504. :
  505. <span class="phpdocumentor-element-found-in__line">50</span>
  506. </aside>
  507. <code class="phpdocumentor-code phpdocumentor-signature ">
  508. <span class="phpdocumentor-signature__visibility">public</span>
  509. <span class="phpdocumentor-signature__name">getLengthInBits</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  510. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  511. Tags
  512. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  513. </h5>
  514. <dl class="phpdocumentor-tag-list">
  515. <dt class="phpdocumentor-tag-list__entry">
  516. <span class="phpdocumentor-tag__name">inheritDoc</span>
  517. </dt>
  518. <dd class="phpdocumentor-tag-list__definition">
  519. </dd>
  520. </dl>
  521. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  522. <span class="phpdocumentor-signature__response_type">int</span>
  523. &mdash;
  524. </article>
  525. <article
  526. class="phpdocumentor-element
  527. -method
  528. -public
  529. -static "
  530. >
  531. <h4 class="phpdocumentor-element__name" id="method_validateString">
  532. validateString()
  533. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_validateString" 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/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  537. :
  538. <span class="phpdocumentor-element-found-in__line">82</span>
  539. </aside>
  540. <p class="phpdocumentor-summary">checks if a string qualifies as SJIS Kanji</p>
  541. <code class="phpdocumentor-code phpdocumentor-signature ">
  542. <span class="phpdocumentor-signature__visibility">public</span>
  543. <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>
  544. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  545. <dl class="phpdocumentor-argument-list">
  546. <dt class="phpdocumentor-argument-list__entry">
  547. <span class="phpdocumentor-signature__argument__name">$string</span>
  548. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  549. </dt>
  550. <dd class="phpdocumentor-argument-list__definition">
  551. <section class="phpdocumentor-description"></section>
  552. </dd>
  553. </dl>
  554. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  555. <span class="phpdocumentor-signature__response_type">bool</span>
  556. &mdash;
  557. </article>
  558. <article
  559. class="phpdocumentor-element
  560. -method
  561. -public
  562. "
  563. >
  564. <h4 class="phpdocumentor-element__name" id="method_write">
  565. write()
  566. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_write" 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/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  570. :
  571. <span class="phpdocumentor-element-found-in__line">121</span>
  572. </aside>
  573. <code class="phpdocumentor-code phpdocumentor-signature ">
  574. <span class="phpdocumentor-signature__visibility">public</span>
  575. <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>
  576. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  577. <dl class="phpdocumentor-argument-list">
  578. <dt class="phpdocumentor-argument-list__entry">
  579. <span class="phpdocumentor-signature__argument__name">$bitBuffer</span>
  580. : <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>
  581. </dt>
  582. <dd class="phpdocumentor-argument-list__definition">
  583. <section class="phpdocumentor-description"></section>
  584. </dd>
  585. <dt class="phpdocumentor-argument-list__entry">
  586. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  587. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  588. </dt>
  589. <dd class="phpdocumentor-argument-list__definition">
  590. <section class="phpdocumentor-description"></section>
  591. </dd>
  592. </dl>
  593. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  594. Tags
  595. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  596. </h5>
  597. <dl class="phpdocumentor-tag-list">
  598. <dt class="phpdocumentor-tag-list__entry">
  599. <span class="phpdocumentor-tag__name">inheritDoc</span>
  600. </dt>
  601. <dd class="phpdocumentor-tag-list__definition">
  602. </dd>
  603. <dt class="phpdocumentor-tag-list__entry">
  604. <span class="phpdocumentor-tag__name">throws</span>
  605. </dt>
  606. <dd class="phpdocumentor-tag-list__definition">
  607. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Data-QRCodeDataException.html"><abbr title="\chillerlan\QRCode\Data\QRCodeDataException">QRCodeDataException</abbr></a></span>
  608. <section class="phpdocumentor-description"><p>on an illegal character occurence</p>
  609. </section>
  610. </dd>
  611. </dl>
  612. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  613. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Data-QRDataModeInterface.html"><abbr title="\chillerlan\QRCode\Data\QRDataModeInterface">QRDataModeInterface</abbr></a></span>
  614. &mdash;
  615. </article>
  616. <article
  617. class="phpdocumentor-element
  618. -method
  619. -protected
  620. "
  621. >
  622. <h4 class="phpdocumentor-element__name" id="method_getCharCount">
  623. getCharCount()
  624. <a href="classes/chillerlan-QRCode-Data-Kanji.html#method_getCharCount" class="headerlink"><i class="fas fa-link"></i></a>
  625. </h4>
  626. <aside class="phpdocumentor-element-found-in">
  627. <abbr class="phpdocumentor-element-found-in__file" title="src/Data/Kanji.php"><a href="files/src-data-kanji.html"><abbr title="src/Data/Kanji.php">Kanji.php</abbr></a></abbr>
  628. :
  629. <span class="phpdocumentor-element-found-in__line">43</span>
  630. </aside>
  631. <p class="phpdocumentor-summary">returns the character count of the $data string</p>
  632. <code class="phpdocumentor-code phpdocumentor-signature ">
  633. <span class="phpdocumentor-signature__visibility">protected</span>
  634. <span class="phpdocumentor-signature__name">getCharCount</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  635. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  636. Tags
  637. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  638. </h5>
  639. <dl class="phpdocumentor-tag-list">
  640. <dt class="phpdocumentor-tag-list__entry">
  641. <span class="phpdocumentor-tag__name">inheritDoc</span>
  642. </dt>
  643. <dd class="phpdocumentor-tag-list__definition">
  644. </dd>
  645. </dl>
  646. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  647. <span class="phpdocumentor-signature__response_type">int</span>
  648. &mdash;
  649. </article>
  650. <article
  651. class="phpdocumentor-element
  652. -method
  653. -protected
  654. -static "
  655. >
  656. <h4 class="phpdocumentor-element__name" id="method_getLengthBits">
  657. getLengthBits()
  658. <a href="classes/chillerlan-QRCode-Data-QRDataModeAbstract.html#method_getLengthBits" class="headerlink"><i class="fas fa-link"></i></a>
  659. </h4>
  660. <aside class="phpdocumentor-element-found-in">
  661. <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>
  662. :
  663. <span class="phpdocumentor-element-found-in__line">69</span>
  664. </aside>
  665. <p class="phpdocumentor-summary">shortcut</p>
  666. <code class="phpdocumentor-code phpdocumentor-signature ">
  667. <span class="phpdocumentor-signature__visibility">protected</span>
  668. <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>
  669. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  670. <dl class="phpdocumentor-argument-list">
  671. <dt class="phpdocumentor-argument-list__entry">
  672. <span class="phpdocumentor-signature__argument__name">$versionNumber</span>
  673. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  674. </dt>
  675. <dd class="phpdocumentor-argument-list__definition">
  676. <section class="phpdocumentor-description"></section>
  677. </dd>
  678. </dl>
  679. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  680. <span class="phpdocumentor-signature__response_type">int</span>
  681. &mdash;
  682. </article>
  683. </section>
  684. <script type="text/javascript">
  685. function loadExternalCodeSnippets(line) {
  686. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  687. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  688. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  689. var language = 'php';
  690. var code = document.createElement('code');
  691. code.className = 'language-' + language;
  692. pre.textContent = '';
  693. pre.setAttribute('data-line', line)
  694. code.textContent = 'Loading…';
  695. pre.appendChild(code);
  696. var xhr = new XMLHttpRequest();
  697. xhr.open('GET', src, true);
  698. xhr.onreadystatechange = function () {
  699. if (xhr.readyState == 4) {
  700. if (xhr.status < 400 && xhr.responseText) {
  701. code.textContent = xhr.responseText;
  702. Prism.highlightElement(code);
  703. }
  704. else if (xhr.status >= 400) {
  705. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  706. }
  707. else {
  708. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  709. }
  710. }
  711. };
  712. xhr.send(null);
  713. });
  714. }
  715. var modals = document.querySelectorAll("[data-modal]");
  716. modals.forEach(function (trigger) {
  717. trigger.addEventListener("click", function (event) {
  718. //event.preventDefault();
  719. const modal = document.getElementById(trigger.dataset.modal);
  720. modal.classList.add("phpdocumentor-modal__open");
  721. loadExternalCodeSnippets(trigger.dataset.line)
  722. const exits = modal.querySelectorAll("[data-exit-button]");
  723. exits.forEach(function (exit) {
  724. exit.addEventListener("click", function (event) {
  725. event.preventDefault();
  726. modal.classList.remove("phpdocumentor-modal__open");
  727. });
  728. });
  729. });
  730. });
  731. </script>
  732. </article>
  733. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  734. <section class="phpdocumentor-search-results__dialog">
  735. <header class="phpdocumentor-search-results__header">
  736. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  737. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  738. </header>
  739. <section class="phpdocumentor-search-results__body">
  740. <ul class="phpdocumentor-search-results__entries"></ul>
  741. </section>
  742. </section>
  743. </section>
  744. </div>
  745. </div>
  746. <a href="classes/chillerlan-QRCode-Data-Kanji.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  747. </main>
  748. <script>
  749. cssVars({});
  750. </script>
  751. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  752. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  753. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  754. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  755. </body>
  756. </html>