1 | <?php |
||
19 | final class Delimiter implements DelimiterInterface |
||
20 | { |
||
21 | /** @var string */ |
||
22 | private $char; |
||
23 | |||
24 | /** @var int */ |
||
25 | private $length; |
||
26 | |||
27 | /** @var int */ |
||
28 | private $originalLength; |
||
29 | |||
30 | /** @var AbstractStringContainer */ |
||
31 | private $inlineNode; |
||
32 | |||
33 | /** @var DelimiterInterface|null */ |
||
34 | private $previous; |
||
35 | |||
36 | /** @var DelimiterInterface|null */ |
||
37 | private $next; |
||
38 | |||
39 | /** @var bool */ |
||
40 | private $canOpen; |
||
41 | |||
42 | /** @var bool */ |
||
43 | private $canClose; |
||
44 | |||
45 | /** @var bool */ |
||
46 | private $active; |
||
47 | |||
48 | /** @var int|null */ |
||
49 | private $index; |
||
50 | |||
51 | /** |
||
52 | * @param string $char |
||
53 | * @param int $numDelims |
||
54 | * @param AbstractStringContainer $node |
||
55 | * @param bool $canOpen |
||
56 | * @param bool $canClose |
||
57 | * @param int|null $index |
||
58 | */ |
||
59 | 1008 | public function __construct(string $char, int $numDelims, AbstractStringContainer $node, bool $canOpen, bool $canClose, ?int $index = null) |
|
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | 924 | public function canClose(): bool |
|
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | 3 | public function setCanClose(bool $canClose) |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 498 | public function canOpen(): bool |
|
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | 426 | public function isActive(): bool |
|
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | 27 | public function setActive(bool $active) |
|
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | 993 | public function getChar(): string |
|
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | 288 | public function getIndex(): ?int |
|
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | 993 | public function getNext(): ?DelimiterInterface |
|
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | 600 | public function setNext(?DelimiterInterface $next) |
|
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | 420 | public function getLength(): int |
|
150 | |||
151 | /** |
||
152 | * {@inheritdoc} |
||
153 | */ |
||
154 | 417 | public function setLength(int $length) |
|
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | 66 | public function getOriginalLength(): int |
|
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | 714 | public function getInlineNode(): AbstractStringContainer |
|
174 | |||
175 | /** |
||
176 | * {@inheritdoc} |
||
177 | */ |
||
178 | 993 | public function getPrevious(): ?DelimiterInterface |
|
182 | |||
183 | /** |
||
184 | * {@inheritdoc} |
||
185 | */ |
||
186 | 993 | public function setPrevious(?DelimiterInterface $previous): DelimiterInterface |
|
192 | } |
||
193 |