1 | <?php |
||
12 | class IndexTemplateManager |
||
13 | { |
||
14 | /** |
||
15 | * Templates |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | private $templates; |
||
20 | |||
21 | 8 | public function __construct(array $templates) |
|
25 | |||
26 | /** |
||
27 | * Gets an index template by its name. |
||
28 | * |
||
29 | * @param string $name Index template to return |
||
30 | * |
||
31 | * @return IndexTemplate |
||
32 | * |
||
33 | * @throws \InvalidArgumentException if no index template exists for the given name |
||
34 | */ |
||
35 | 7 | public function getIndexTemplate($name) |
|
43 | } |
||
44 |