Exemplo n.º 1
0
 /**
  * Register a valid view extension and its engine.
  *
  * @param  string   $extension
  * @param  string   $engine
  * @param  Closure  $resolver
  * @return void
  */
 public function addExtension($extension, $engine, $resolver = null)
 {
     $this->finder->addExtension($extension);
     if (isset($resolver)) {
         $this->engines->register($engine, $resolver);
     }
     unset($this->extensions[$extension]);
     $this->extensions = array_merge(array($extension => $engine), $this->extensions);
 }
Exemplo n.º 2
0
 /**
  * Register the PHP engine implementation.
  *
  * @param  \View\Engines\EngineResolver  $resolver
  * @return void
  */
 public function registerPhpEngine($resolver)
 {
     $resolver->register('php', function () {
         return new PhpEngine();
     });
 }