| 1 | <?php |
||
| 13 | class TemplateFinder implements TemplateFinderInterface |
||
| 14 | { |
||
| 15 | private $parser; |
||
| 16 | private $paths; |
||
| 17 | private $templates; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor. |
||
| 21 | * |
||
| 22 | * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance |
||
| 23 | * @param array $paths The directory where global templates can be stored |
||
| 24 | */ |
||
| 25 | 2 | public function __construct(TemplateNameParserInterface $parser, $paths = []) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Find all the templates in the bundle and in the kernel Resources folder. |
||
| 33 | * |
||
| 34 | * @return TemplateReferenceInterface[] |
||
| 35 | */ |
||
| 36 | 2 | public function findAllTemplates() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Find templates in the given directory. |
||
| 53 | * |
||
| 54 | * @param string $dir The folder where to look for templates |
||
| 55 | * |
||
| 56 | * @return TemplateReferenceInterface[] |
||
| 57 | */ |
||
| 58 | 2 | private function findTemplatesInFolder($dir) |
|
| 74 | } |
||
| 75 |