1 | <?php |
||
10 | final class ProcessedShortcode extends AbstractShortcode implements ParsedShortcodeInterface |
||
11 | { |
||
12 | /** @var ProcessedShortcode|null */ |
||
13 | private $parent; |
||
14 | /** @var int */ |
||
15 | private $position; |
||
16 | /** @var int */ |
||
17 | private $namePosition; |
||
18 | /** @var string */ |
||
19 | private $text; |
||
20 | /** @var string */ |
||
21 | private $textContent; |
||
22 | /** @var int */ |
||
23 | private $offset; |
||
24 | /** @var int */ |
||
25 | private $baseOffset; |
||
26 | /** @var string */ |
||
27 | private $shortcodeText; |
||
28 | /** @var int */ |
||
29 | private $iterationNumber; |
||
30 | /** @var int */ |
||
31 | private $recursionLevel; |
||
32 | /** @var ProcessorInterface */ |
||
33 | private $processor; |
||
34 | |||
35 | 59 | private function __construct(ProcessorContext $context) |
|
60 | |||
61 | /** @return self */ |
||
62 | 59 | public static function createFromContext(ProcessorContext $context) |
|
66 | |||
67 | /** |
||
68 | * @param string|null $content |
||
69 | * |
||
70 | * @return self |
||
71 | */ |
||
72 | 57 | public function withContent($content) |
|
79 | |||
80 | /** |
||
81 | * @param string $name |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | 1 | public function hasAncestor($name) |
|
97 | |||
98 | /** @return ProcessedShortcode|null */ |
||
99 | 4 | public function getParent() |
|
103 | |||
104 | /** @return string */ |
||
105 | 13 | public function getTextContent() |
|
109 | |||
110 | /** @return int */ |
||
111 | 2 | public function getPosition() |
|
115 | |||
116 | /** @return int */ |
||
117 | 2 | public function getNamePosition() |
|
121 | |||
122 | /** @return string */ |
||
123 | 1 | public function getText() |
|
127 | |||
128 | /** @return string */ |
||
129 | 17 | public function getShortcodeText() |
|
133 | |||
134 | /** @return int */ |
||
135 | 17 | public function getOffset() |
|
139 | |||
140 | /** @return int */ |
||
141 | 1 | public function getBaseOffset() |
|
145 | |||
146 | /** @return int */ |
||
147 | 1 | public function getIterationNumber() |
|
151 | |||
152 | /** @return int */ |
||
153 | 1 | public function getRecursionLevel() |
|
157 | |||
158 | /** @return ProcessorInterface */ |
||
159 | 1 | public function getProcessor() |
|
163 | } |
||
164 |