Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | trait HasViewFinder |
||
15 | { |
||
16 | /** |
||
17 | * Adds a path where templates are stored. |
||
18 | * |
||
19 | * @param string $path A path where to look for templates |
||
20 | * @param string $namespace A path namespace |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | public function addPath($path, $namespace = ThemeFolderResolveTemplatePath::MAIN_NAMESPACE) |
||
25 | { |
||
26 | $this->getResolveTemplatePath()->addPath($path, $namespace); |
||
|
|||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Prepends a path where templates are stored. |
||
31 | * |
||
32 | * @param string $path A path where to look for templates |
||
33 | * @param string $namespace A path namespace |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | public function prependPath($path, $namespace = ThemeFolderResolveTemplatePath::MAIN_NAMESPACE) |
||
38 | { |
||
39 | $this->getResolveTemplatePath()->prependPath($path, $namespace); |
||
40 | } |
||
41 | |||
42 | public function existPath($view): bool |
||
51 | } |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @deprecated use getResolveTemplatePath |
||
56 | */ |
||
57 | public function getFinder(): ResolveTemplatePath |
||
60 | } |
||
61 | } |
||
62 |