| 1 | <?php namespace Tarsana\Command\Template\Twig; |
||
| 10 | class TwigLoader implements TemplateLoaderInterface { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Twig Environment. |
||
| 14 | * |
||
| 15 | * @var \Twig_Environment |
||
| 16 | */ |
||
| 17 | protected $env; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Initialize the loader. |
||
| 21 | * |
||
| 22 | * @param string $templatesPath |
||
| 23 | * @param string $cachePath |
||
| 24 | * @return self |
||
| 25 | */ |
||
| 26 | public function init(string $templatesPath, string $cachePath = null) : TemplateLoaderInterface |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Loads a template. |
||
| 41 | * |
||
| 42 | * @param string $name |
||
| 43 | * @return Tarsana\Command\Template\Twig\TwigTemplate |
||
| 44 | */ |
||
| 45 | public function load(string $name) : TemplateInterface |
||
| 49 | |||
| 50 | } |
||
| 51 |