1 | <?php |
||
21 | class EngineCollection implements \ArrayAccess, \IteratorAggregate |
||
22 | { |
||
23 | use AccessorTrait; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $engines; |
||
29 | |||
30 | /** |
||
31 | * @return array |
||
32 | */ |
||
33 | protected function get_extensions() |
||
37 | |||
38 | /** |
||
39 | * @var Engine[] |
||
40 | */ |
||
41 | private $instances; |
||
42 | |||
43 | /** |
||
44 | * @param array $engines |
||
45 | */ |
||
46 | public function __construct(array $engines = []) |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function offsetExists($extension) |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | public function offsetGet($extension) |
||
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | */ |
||
90 | public function offsetSet($extension, $engine) |
||
94 | |||
95 | /** |
||
96 | * @inheritdoc |
||
97 | */ |
||
98 | public function offsetUnset($extension) |
||
102 | |||
103 | /** |
||
104 | * @inheritdoc |
||
105 | */ |
||
106 | public function getIterator() |
||
110 | |||
111 | /** |
||
112 | * Resolves the engine to use from the specified pathname. |
||
113 | * |
||
114 | * @param $pathname |
||
115 | * |
||
116 | * @return Engine|bool An engine or `false` if none matches the extension. |
||
117 | */ |
||
118 | public function resolve_engine($pathname) |
||
136 | |||
137 | /** |
||
138 | * Renders a template with the specified variables. |
||
139 | * |
||
140 | * @param string $template_pathname The pathname of the template. |
||
141 | * @param mixed $thisArg The subject of the rendering. |
||
142 | * @param array $variables |
||
143 | * @param array $options |
||
144 | * |
||
145 | * @return string |
||
146 | * |
||
147 | * @throws EngineNotAvailable when there is no engine available to render the template. |
||
148 | */ |
||
149 | public function render($template_pathname, $thisArg, $variables, array $options = []) |
||
160 | } |
||
161 |