1 | <?php |
||
9 | class UqlExtensionContainer |
||
10 | { |
||
11 | /** |
||
12 | * @var UqlExtensionInterface[] |
||
13 | */ |
||
14 | private $extensions = []; |
||
15 | |||
16 | /** |
||
17 | * @var UqlFunction[] |
||
18 | */ |
||
19 | private $functions = []; |
||
20 | |||
21 | /** |
||
22 | * @return UqlExtensionInterface[] |
||
23 | */ |
||
24 | public function getExtensions() |
||
28 | |||
29 | /** |
||
30 | * Performs a call to a function defined in any of the extensions managed by the container. |
||
31 | * |
||
32 | * @param $name |
||
33 | * @param $arguments |
||
34 | * |
||
35 | * @return mixed |
||
36 | * @throws Exception\FunctionNotFoundException |
||
37 | */ |
||
38 | public function callFunction($name, $arguments) |
||
46 | |||
47 | /** |
||
48 | * @return UqlFunction[] |
||
49 | */ |
||
50 | public function getFunctions() |
||
54 | |||
55 | /** |
||
56 | * Adds an extension to the container. This function is called during the compiler pass. |
||
57 | * |
||
58 | * @param UqlExtensionInterface $extension |
||
59 | * |
||
60 | * @throws Exception\InvalidExtensionTypeException |
||
61 | */ |
||
62 | public function addExtension(UqlExtensionInterface $extension) |
||
73 | } |
||
74 |