1 | <?php |
||
8 | class UqlExtensionContainer |
||
9 | { |
||
10 | /** |
||
11 | * @var UqlExtensionInterface[] |
||
12 | */ |
||
13 | private $extensions = []; |
||
14 | |||
15 | /** |
||
16 | * @var UqlFunctionInterface[] |
||
17 | */ |
||
18 | private $functions = []; |
||
19 | |||
20 | /** |
||
21 | * @return UqlExtensionInterface[] |
||
22 | */ |
||
23 | public function getExtensions() |
||
27 | |||
28 | /** |
||
29 | * @param string $name |
||
30 | * |
||
31 | * @return UqlFunctionInterface |
||
32 | * @throws FunctionNotFoundException |
||
33 | */ |
||
34 | public function getFunction($name) |
||
42 | |||
43 | /** |
||
44 | * @return UqlFunctionInterface[] |
||
45 | */ |
||
46 | public function getFunctions() |
||
50 | |||
51 | /** |
||
52 | * Adds an extension to the container. This function is called during the compiler pass. |
||
53 | * |
||
54 | * @param UqlExtensionInterface $extension |
||
55 | * |
||
56 | * @throws InvalidExtensionTypeException |
||
57 | */ |
||
58 | public function addExtension(UqlExtensionInterface $extension) |
||
69 | } |
||
70 |