19 private $assetRepository;
26 $this->assetRepository = $assetRepository;
38 if (preg_match_all(Variable::VAR_REGEX, $css, $matches, PREG_SET_ORDER)) {
40 foreach ($matches as $match) {
41 if (!isset($replacements[$match[0]])) {
42 $replacements[$match[0]] = $this->getPlaceholderValue($match[1]);
45 $css = str_replace(array_keys($replacements), $replacements, $css);
56 private function getPlaceholderValue($placeholder)
59 $context = $this->assetRepository->getStaticViewFileContext();
61 switch ($placeholder) {
63 return $context->getBaseUrl();
65 return $context->getLocale();
__construct(Repository $assetRepository)