1 | <?php |
||
12 | class Utf8 extends BaseImplementation |
||
13 | { |
||
14 | /** |
||
15 | * @var bool Whether to use surrogates to represent higher codepoints |
||
16 | */ |
||
17 | protected $useSurrogates; |
||
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | 9 | public function __construct(array $options = []) |
|
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | 9 | public function split($string) |
|
39 | |||
40 | /** |
||
41 | * Convert a list of UTF-8 characters into a list of Unicode codepoint |
||
42 | * |
||
43 | * @param string[] $chars |
||
44 | * @return integer[] |
||
45 | */ |
||
46 | 6 | protected function charsToCodepoints(array $chars) |
|
50 | |||
51 | /** |
||
52 | * Convert a list of UTF-8 characters into a list of Unicode codepoint with surrogates |
||
53 | * |
||
54 | * @param string[] $chars |
||
55 | * @return integer[] |
||
56 | */ |
||
57 | 2 | protected function charsToCodepointsWithSurrogates(array $chars) |
|
76 | |||
77 | /** |
||
78 | * Compute and return the Unicode codepoint for given UTF-8 char |
||
79 | * |
||
80 | * @param string $char UTF-8 char |
||
81 | * @return integer |
||
82 | */ |
||
83 | 7 | protected function cp($char) |
|
101 | } |