1 | <?php |
||
10 | class CodepointAssignedParser implements ElementParser |
||
11 | { |
||
12 | const TAG_NAME_CHAR = 'char'; |
||
13 | const TAG_NAME_NON_CHAR = 'noncharacter'; |
||
14 | const TAG_NAME_SURROGATE = 'surrogate'; |
||
15 | |||
16 | const ATTR_CODEPOINT = 'cp'; |
||
17 | const ATTR_CODEPOINT_FIRST = 'first-cp'; |
||
18 | const ATTR_CODEPOINT_LAST = 'last-cp'; |
||
19 | |||
20 | /** |
||
21 | * @var CharacterParser |
||
22 | */ |
||
23 | private $characterParser; |
||
24 | |||
25 | /** |
||
26 | * @var NonCharacterParser |
||
27 | */ |
||
28 | private $nonCharacterParser; |
||
29 | |||
30 | /** |
||
31 | * @var SurrogateParser |
||
32 | */ |
||
33 | private $surrogateParser; |
||
34 | |||
35 | /** |
||
36 | * @param CharacterParser $characterParser |
||
37 | * @param NonCharacterParser $nonCharacterParser |
||
38 | * @param SurrogateParser $surrogateParser |
||
39 | */ |
||
40 | public function __construct( |
||
49 | |||
50 | /** |
||
51 | * @param \DOMElement $element |
||
52 | * @return CodepointAssigned[] |
||
53 | */ |
||
54 | public function parseElement(\DOMElement $element) |
||
64 | |||
65 | /** |
||
66 | * @param \DOMElement $element |
||
67 | * @return CodepointAwareParser |
||
68 | * @throws RuntimeException |
||
69 | */ |
||
70 | private function getParserForElement(\DOMElement $element) |
||
82 | |||
83 | /** |
||
84 | * @param \DOMElement $element |
||
85 | * @return \int[] |
||
86 | */ |
||
87 | private function extractCodepoints(\DOMElement $element) |
||
99 | } |