Beispiel #1
0
 /**
  * Method to get property Compiler
  *
  * @return  CompilerEngine
  */
 public function getCompiler()
 {
     if (!$this->compiler) {
         $cachePath = $this->config->get('cache_path') ?: GlobalContainer::getCachePath();
         if (!$cachePath) {
             throw new \InvalidArgumentException('Please set cache_path into config.');
         }
         if (!is_dir($cachePath)) {
             mkdir($cachePath, 0755, true);
         }
         $this->compiler = new CompilerEngine(new BladeCompiler($this->getFilesystem(), $cachePath));
     }
     return $this->compiler;
 }