1 | <?php |
||
9 | final class FilesystemLoader implements Twig_LoaderInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $path; |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $fileExtensions = []; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $cache = []; |
||
25 | |||
26 | /** |
||
27 | * @param string $path The template directory path |
||
28 | * @param array $fileExtensions The template file extensions |
||
29 | */ |
||
30 | 6 | public function __construct( |
|
37 | |||
38 | public function getSourceContext($name) |
||
44 | |||
45 | /** |
||
46 | * @inheritDoc |
||
47 | */ |
||
48 | public function getCacheKey($name) |
||
52 | |||
53 | /** |
||
54 | * @inheritDoc |
||
55 | */ |
||
56 | public function isFresh($name, $time) |
||
60 | |||
61 | /** |
||
62 | * @inheritDoc |
||
63 | */ |
||
64 | public function exists($name) |
||
72 | |||
73 | /** |
||
74 | * @param string $name |
||
75 | * |
||
76 | * @return string |
||
77 | * |
||
78 | * @throws LoaderException |
||
79 | * When $name is not found. |
||
80 | */ |
||
81 | private function template($name) |
||
94 | |||
95 | /** |
||
96 | * @param string $name |
||
97 | * |
||
98 | * @return string|null |
||
99 | */ |
||
100 | private function findTemplate($name) |
||
113 | |||
114 | /** |
||
115 | * @param string $name |
||
116 | * |
||
117 | * @return array |
||
118 | */ |
||
119 | private function possibleTemplateFiles($name) |
||
130 | |||
131 | /** |
||
132 | * @param string $name |
||
133 | * |
||
134 | * @return string |
||
135 | */ |
||
136 | private function normalizeName($name) |
||
143 | } |
||
144 |