chillerlan-QRCode-Data-Kanji.html 44 KB

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