Beispiel #1
0
 /**
  * Determine if the view at the given path is expired.
  *
  * @param  string  $path
  * @return bool
  */
 public function isExpired($path)
 {
     if ($this->hasChanged($path)) {
         return true;
     }
     return parent::isExpired($path);
 }
 /**
  * Create a new JadeCompiler instance.
  *
  * @param \Illuminate\Filesystem\Filesystem $files
  * @param string $cachePath
  */
 public function __construct(Filesystem $files, $cachePath)
 {
     parent::__construct($files, $cachePath);
     $this->dumper = new PHPDumper();
     $this->dumper->registerVisitor('tag', new AutotagsVisitor());
     $this->dumper->registerFilter('javascript', new JavaScriptFilter());
     $this->dumper->registerFilter('cdata', new CDATAFilter());
     $this->dumper->registerFilter('php', new PHPFilter());
     $this->dumper->registerFilter('style', new CSSFilter());
     $this->lexer = new Lexer();
     $this->parser = new Parser($this->lexer);
     $this->jade = new Jade($this->parser, $this->dumper);
 }
 /**
  * Create a new instance.
  *
  * @param \League\CommonMark\CommonMarkConverter $markdown
  * @param \Illuminate\Filesystem\Filesystem      $files
  * @param string                                 $cachePath
  *
  * @return void
  */
 public function __construct(CommonMarkConverter $markdown, Filesystem $files, $cachePath)
 {
     parent::__construct($files, $cachePath);
     $this->markdown = $markdown;
 }
 /**
  * Create a new instance
  *
  * @param \Radic\BladeExtensions\Contracts\MarkdownRenderer $renderer
  * @param \Illuminate\Filesystem\Filesystem $files
  * @param            $cachePath
  */
 public function __construct(MarkdownRenderer $renderer, Filesystem $files, $cachePath)
 {
     parent::__construct($files, $cachePath);
     $this->renderer = $renderer;
 }
 /**
  * Create a new JadeCompiler instance.
  *
  * @param \Illuminate\Filesystem\Filesystem $files
  * @param string $cachePath
  */
 public function __construct(Filesystem $files, $cachePath)
 {
     parent::__construct($files, $cachePath);
     $this->jade = new Jade(['prettyprint' => true, 'extension' => '.jade']);
 }
Beispiel #6
0
 /**
  * Create a new compiler instance.
  *
  * @param  Pug $pug
  * @param  Illuminate\Filesystem\Filesystem  $files
  * @param  string  $cachePath
  * @return void
  */
 public function __construct(Pug $pug, Filesystem $files, $cachePath)
 {
     $this->pug = $pug;
     parent::__construct($files, $cachePath);
 }
Beispiel #7
0
 /**
  * Create a new compiler instance.
  *
  * @param  \Illuminate\Filesystem\Filesystem $files
  */
 public function __construct(Filesystem $files)
 {
     $virtualCacheDir = uniqid('.cache-');
     vfsStream::setup('root', null, [$virtualCacheDir => []]);
     parent::__construct($files, vfsStream::url('root/' . $virtualCacheDir));
 }
 /**
  * Create a new instance.
  *
  * @param \League\CommonMark\Converter      $markdown
  * @param \Illuminate\Filesystem\Filesystem $files
  * @param string                            $cachePath
  *
  * @return void
  */
 public function __construct(Converter $reStructuredText, Filesystem $files, $cachePath)
 {
     parent::__construct($files, $cachePath);
     $this->reStructuredText = $reStructuredText;
 }
 public function isExpired($path)
 {
     return parent::isExpired($path) || config('app.debug');
 }
 /**
  * Make sure that developing locally is fun.
  *
  * @param string $path
  * @return bool
  */
 public function isExpired($path)
 {
     if ($this->developmentEnvironment) {
         return true;
     }
     return parent::isExpired($path);
 }
Beispiel #11
0
 /**
  * Create a new compiler instance.
  *
  * @param  \MtHaml\Environment $mthaml
  * @param  \Illuminate\Filesystem\Filesystem  $files
  * @param  string  $cachePath
  * @return void
  */
 public function __construct(Environment $mthaml, Filesystem $files, $cachePath)
 {
     $this->mthaml = $mthaml;
     parent::__construct($files, $cachePath);
 }
Beispiel #12
0
 function __construct(Twig_Environment $twig)
 {
     parent::__construct();
     $this->twig = $twig;
 }