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