1 | <?php |
||
17 | trait TemplateResolverTrait |
||
18 | { |
||
19 | /** |
||
20 | * Resolves path tries. |
||
21 | * |
||
22 | * The method resolves a try path collection from a collection of roots, template name, and |
||
23 | * extension collection. |
||
24 | * |
||
25 | * @param array $paths Template directories paths. |
||
26 | * @param string $name Template name. |
||
27 | * @param array $extensions Supported extensions. |
||
28 | * |
||
29 | * @return array A collection of candidate template pathnames. |
||
30 | */ |
||
31 | protected function resolve_tries(array $paths, $name, array $extensions) |
||
66 | |||
67 | /** |
||
68 | * Resolves a template path. |
||
69 | * |
||
70 | * The method returns the pathname of the first file matching the path collection. The tried |
||
71 | * paths are collected in `$tried`. |
||
72 | * |
||
73 | * @param array $tries Pathname collection, as returned by {@link resolve_tries()}. |
||
74 | * @param array $tried Tried pathname collection. |
||
75 | * |
||
76 | * @return string|null |
||
77 | */ |
||
78 | protected function resolve_path(array $tries, &$tried) |
||
92 | } |
||
93 |