1 | <?php |
||
28 | class TwigTemplateCacheWarmer implements CacheWarmerInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var ResourceRepository |
||
32 | */ |
||
33 | private $repo; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $suffix; |
||
39 | |||
40 | /** |
||
41 | * @var Twig_Environment |
||
42 | */ |
||
43 | private $twig; |
||
44 | |||
45 | 1 | public function __construct(ResourceRepository $repo, Twig_Environment $twig, $suffix = '.twig') |
|
51 | |||
52 | /** |
||
53 | * Warms up the cache. |
||
54 | * |
||
55 | * @param string $cacheDir The cache directory |
||
56 | * |
||
57 | * @throws RuntimeException If setEnvironment() wasn't called |
||
58 | */ |
||
59 | 1 | public function warmUp($cacheDir) |
|
81 | |||
82 | /** |
||
83 | * Returns whether this warmer is optional or not. |
||
84 | * |
||
85 | * @return bool always true |
||
86 | */ |
||
87 | public function isOptional() |
||
91 | } |
||
92 |