1 | <?php |
||
24 | class ApplicationTemplateResolver implements TemplateResolverDecorator |
||
25 | { |
||
26 | use TemplateResolverTrait; |
||
27 | use TemplateResolverDecoratorTrait; |
||
28 | |||
29 | /** |
||
30 | * Application paths. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | private $paths; |
||
35 | |||
36 | /** |
||
37 | * @param TemplateResolver $template_resolver |
||
38 | * @param array $paths Application paths. |
||
39 | */ |
||
40 | public function __construct(TemplateResolver $template_resolver, array $paths) |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function resolve($name, array $extensions, &$tried = []) |
||
65 | |||
66 | /** |
||
67 | * Resolves a template name from the application paths. |
||
68 | * |
||
69 | * @param string $name |
||
70 | * @param array $extensions |
||
71 | * @param array $tried |
||
72 | * |
||
73 | * @return string|null |
||
74 | */ |
||
75 | protected function resolve_from_app($name, array $extensions, &$tried) |
||
79 | |||
80 | /** |
||
81 | * Expends application paths into template paths. |
||
82 | * |
||
83 | * **Note:** Paths that do not have a "templates" directory are discarded. |
||
84 | * |
||
85 | * @param array $paths |
||
86 | * |
||
87 | * @return array |
||
88 | */ |
||
89 | protected function expend_paths(array $paths) |
||
105 | } |
||
106 |