1 | <?php |
||
11 | class FilesystemLoader implements TemplateLoaderInterface { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $basePath; |
||
16 | |||
17 | 13 | public function __construct($basePath) { |
|
20 | |||
21 | /** |
||
22 | * Return the cache key of a component. |
||
23 | * |
||
24 | * @param string $component The name of the component. |
||
25 | * @return string Returns the unique key of the component. |
||
26 | */ |
||
27 | 13 | public function cacheKey($component) { |
|
36 | |||
37 | /** |
||
38 | * Return the template source of a component. |
||
39 | * |
||
40 | * @param string $component The name of the component. |
||
41 | * @return string Returns the template source of the component. |
||
|
|||
42 | */ |
||
43 | 12 | public function load($component) { |
|
52 | |||
53 | 13 | private function componentPath($component, $full = true) { |
|
72 | |||
73 | /** |
||
74 | * Get the basePath. |
||
75 | * |
||
76 | * @return string Returns the basePath. |
||
77 | */ |
||
78 | public function getBasePath() { |
||
81 | |||
82 | /** |
||
83 | * Set the basePath. |
||
84 | * |
||
85 | * @param string $basePath |
||
86 | * @return $this |
||
87 | */ |
||
88 | public function setBasePath($basePath) { |
||
92 | } |
||
93 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.