1 | <?php |
||
26 | final class TemplatePathsCacheWarmer implements CacheWarmerInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var TemplateFinderInterface |
||
30 | */ |
||
31 | private $templateFinder; |
||
32 | |||
33 | /** |
||
34 | * @var TemplateLocatorInterface |
||
35 | */ |
||
36 | private $templateLocator; |
||
37 | |||
38 | /** |
||
39 | * @var ThemeRepositoryInterface |
||
40 | */ |
||
41 | private $themeRepository; |
||
42 | |||
43 | /** |
||
44 | * @var Cache |
||
45 | */ |
||
46 | private $cache; |
||
47 | |||
48 | /** |
||
49 | * @param TemplateFinderInterface $templateFinder |
||
50 | * @param TemplateLocatorInterface $templateLocator |
||
51 | * @param ThemeRepositoryInterface $themeRepository |
||
52 | * @param Cache $cache |
||
53 | */ |
||
54 | public function __construct( |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function warmUp($cacheDir) |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function isOptional() |
||
86 | |||
87 | /** |
||
88 | * @param TemplateReferenceInterface $template |
||
89 | */ |
||
90 | private function warmUpTemplate(TemplateReferenceInterface $template) |
||
97 | |||
98 | /** |
||
99 | * @param TemplateReferenceInterface $template |
||
100 | * @param ThemeInterface $theme |
||
101 | */ |
||
102 | private function warmUpThemeTemplate(TemplateReferenceInterface $template, ThemeInterface $theme) |
||
112 | |||
113 | /** |
||
114 | * @param TemplateReferenceInterface $template |
||
115 | * @param ThemeInterface $theme |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | private function getCacheKey(TemplateReferenceInterface $template, ThemeInterface $theme) |
||
123 | } |
||
124 |