1 | <?php |
||
13 | abstract class AbstractExpressionCompiler implements ExpressionCompilerInterface |
||
14 | { |
||
15 | /** |
||
16 | * @abstract |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $name = 'unknown'; |
||
20 | |||
21 | 369 | protected function assertExpression($expression) |
|
27 | |||
28 | /** |
||
29 | * @param $expr |
||
30 | * @param Context $context |
||
31 | * @return CompiledExpression |
||
32 | */ |
||
33 | 369 | public function pass($expr, Context $context) |
|
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | 1 | public function getName() |
|
46 | |||
47 | /** |
||
48 | * @param $expr |
||
49 | * @param Context $context |
||
50 | * @return mixed |
||
51 | */ |
||
52 | abstract protected function compile($expr, Context $context); |
||
53 | } |
||
54 |