1 | <?php |
||
10 | class MultiViewFinder implements ViewFinder |
||
11 | { |
||
12 | /** |
||
13 | * @var ViewFinder[] stack of view-finders |
||
14 | */ |
||
15 | protected $finders = array(); |
||
16 | |||
17 | /** |
||
18 | * Add a view-finder to the top of the stack - the added view-finder will |
||
19 | * have the highest priority of view-finders currently on the stack. |
||
20 | * |
||
21 | * @param ViewFinder $finder |
||
22 | */ |
||
23 | 1 | public function pushViewFinder(ViewFinder $finder) |
|
27 | |||
28 | /** |
||
29 | * Add a view-finder to the bottom of the stack - the added view-finder will |
||
30 | * have the lowest priority of view-finders currently on the stack. |
||
31 | * |
||
32 | * @param ViewFinder $finder |
||
33 | */ |
||
34 | 1 | public function addViewFinder(ViewFinder $finder) |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | * |
||
42 | * @see ViewFinder::findTemplate() |
||
43 | */ |
||
44 | 1 | public function findTemplate($view_model, $type) |
|
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | * |
||
60 | * @see ViewFinder::listSearchPaths() |
||
61 | */ |
||
62 | 1 | public function listSearchPaths($view_model, $type) |
|
72 | } |
||
73 |