1 | <?php |
||
21 | class IndexTemplateManager |
||
22 | { |
||
23 | /** |
||
24 | * Templates. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | private $templates; |
||
29 | |||
30 | 8 | public function __construct(array $templates) |
|
34 | |||
35 | /** |
||
36 | * Gets an index template by its name. |
||
37 | * |
||
38 | * @param string $name Index template to return |
||
39 | * |
||
40 | * @return IndexTemplate |
||
41 | * |
||
42 | * @throws \InvalidArgumentException if no index template exists for the given name |
||
43 | */ |
||
44 | 7 | public function getIndexTemplate($name) |
|
52 | } |
||
53 |