Beispiel #1
0
 /**
  * Constructor
  *
  * @param
  */
 public function __construct(MinifyServiceInterface $minifyService, $config)
 {
     $this->minifyService = $minifyService;
     $this->minifyConfig = $config;
     $this->minifyEnabled = $this->minifyConfig['minifyCSS']['enabled'];
     $this->minifyDocRootDir = trim($this->minifyConfig['docRootDir'], '/\\ ');
     $this->minifyDocRootPath = getcwd() . '/' . $this->minifyDocRootDir . '/';
     $this->minifyCacheDir = trim($this->minifyConfig['cacheDir'], '/\\ ');
     $this->minifyCachePath = $this->minifyDocRootPath . $this->minifyCacheDir;
     if (!file_exists($this->minifyCachePath) && mkdir($this->minifyCachePath, 0755, true) === false) {
         throw new \Exception("Cache dir does not exist and could not be created - '{$this->minifyCachePath}'");
     }
     if (!is_writable($this->minifyCachePath)) {
         throw new \Exception("Cache path not writable - '{$this->minifyCachePath}'");
     }
     parent::__construct();
 }
Beispiel #2
0
 /**
  * Constructor
  */
 public function __construct(StylesConfig $config)
 {
     parent::__construct();
     $this->config = $config;
 }
Beispiel #3
0
 /**
  * Constructor
  *
  * @param ThemeInfo   $themeInfo Theme information service
  * @param string|bool $plconfig  Config for current application environment
  */
 public function __construct(ThemeInfo $themeInfo, $plconfig = false)
 {
     parent::__construct();
     $this->themeInfo = $themeInfo;
     $this->usePipeline = $this->enabledInConfig($plconfig);
 }
Beispiel #4
0
 /**
  * Constructor
  *
  * @param ThemeInfo $themeInfo Theme information service
  */
 public function __construct(ThemeInfo $themeInfo)
 {
     parent::__construct();
     $this->themeInfo = $themeInfo;
 }
Beispiel #5
0
 /**
  * @param array $cdnOptions
  */
 public function __construct($cdnOptions = [])
 {
     $this->setCdnOptions($cdnOptions);
     parent::__construct();
 }