1 | <?php |
||
26 | class Frontend implements LoggerAwareInterface |
||
27 | { |
||
28 | use LoggerAwareTrait; |
||
29 | |||
30 | /** |
||
31 | * @var Parser |
||
32 | */ |
||
33 | private $parser; |
||
34 | |||
35 | /** |
||
36 | * @var Builder |
||
37 | */ |
||
38 | private $builder; |
||
39 | |||
40 | /** |
||
41 | * Frontend constructor. |
||
42 | */ |
||
43 | public function __construct() |
||
48 | |||
49 | /** |
||
50 | * @param Readable $readable |
||
51 | * @return mixed|null |
||
52 | * @throws SyntaxException |
||
53 | * @throws CompilerException |
||
54 | */ |
||
55 | public function load(Readable $readable) |
||
61 | |||
62 | /** |
||
63 | * Parse the file using top-down parser and |
||
64 | * return the Abstract Syntax Tree. |
||
65 | * |
||
66 | * @param Readable $file |
||
67 | * @return RuleInterface |
||
68 | * @throws SyntaxException |
||
69 | */ |
||
70 | private function parse(Readable $file): RuleInterface |
||
81 | |||
82 | /** |
||
83 | * @param LoggerInterface $logger |
||
84 | * @return Frontend |
||
85 | */ |
||
86 | public function setLogger(LoggerInterface $logger): self |
||
92 | } |
||
93 |