Пример #1
0
 /**
  * Constructor.
  *
  * @param string               $cacheDir The cache path
  * @param FileLocatorInterface $locator  A FileLocatorInterface instance
  * @param string               $path     A global fallback path
  */
 public function __construct($cacheDir, FileLocatorInterface $locator, $path)
 {
     if (!file_exists($cache = $cacheDir . '/templates.php')) {
         throw new \RuntimeException(sprintf('The template locator cache is not warmed up (%s).', $cache));
     }
     $this->templates = (require $cache);
     parent::__construct($locator, $path);
 }
Пример #2
0
 /**
  * Constructor.
  *
  * @param FileLocatorInterface  $locator
  * @param ThemeManager          $themeManager
  * @param string                $cacheDir
  */
 public function __construct(FileLocatorInterface $locator, ThemeManager $themeManager, $cacheDir = null)
 {
     parent::__construct($locator, $cacheDir);
     $this->themeManager = $themeManager;
 }
Пример #3
0
 /**
  * Constructor.
  *
  * @param FileLocatorInterface $locator     A FileLocatorInterface instance
  * @param string               $cacheDir    The cache path
  * @param ActiveTheme          $activeTheme
  */
 public function __construct(FileLocatorInterface $locator, $cacheDir = null, ActiveTheme $activeTheme = null)
 {
     $this->activeTheme = $activeTheme;
     parent::__construct($locator, $cacheDir);
 }