1 | <?php |
||
8 | abstract class BaseTokenParser extends \Twig_TokenParser |
||
|
|||
9 | { |
||
10 | /** |
||
11 | * @var int |
||
12 | */ |
||
13 | const PARAMETER_TYPE_ARRAY = 0; |
||
14 | |||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | const PARAMETER_TYPE_VALUE = 1; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | private $attributes; |
||
24 | |||
25 | /** |
||
26 | * BaseTokenParser constructor. |
||
27 | * |
||
28 | * @param array $attributes optional attributes for the corresponding node |
||
29 | */ |
||
30 | 8 | public function __construct(array $attributes = []) |
|
34 | |||
35 | /** |
||
36 | * @param \Twig_Token $token |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | 3 | public function configureParameters(\Twig_Token $token): array |
|
44 | |||
45 | /** |
||
46 | * @return array |
||
47 | */ |
||
48 | 50 | public function getAttributes(): array |
|
52 | |||
53 | /** |
||
54 | * Create a concrete node. |
||
55 | * |
||
56 | * @param array $nodes |
||
57 | * @param int $lineNo |
||
58 | * |
||
59 | * @return \Twig_Node |
||
60 | */ |
||
61 | abstract public function createNode(array $nodes = [], int $lineNo = 0): \Twig_Node; |
||
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | */ |
||
66 | 50 | public function hasBody(): bool |
|
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | * |
||
74 | * @throws \Exception |
||
75 | * @throws \InvalidArgumentException |
||
76 | */ |
||
77 | 50 | public function parse(\Twig_Token $token) |
|
89 | |||
90 | /** |
||
91 | * @param array $parameterConfiguration |
||
92 | * |
||
93 | * @throws \Exception |
||
94 | * @throws \InvalidArgumentException |
||
95 | * @throws \Twig_Error_Syntax |
||
96 | * |
||
97 | * @return \Twig_Node_Expression[] |
||
98 | */ |
||
99 | 50 | private function parseParameters(array $parameterConfiguration = []): array |
|
149 | |||
150 | /** |
||
151 | * @return \Twig_Node |
||
152 | * @throws \Twig_Error_Syntax |
||
153 | */ |
||
154 | private function parseBody(): \Twig_Node |
||
161 | } |
||
162 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.