/** * 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); }
/** * Register the PHP engine implementation. * * @param \Nova\View\Engines\EngineResolver $resolver * @return void */ public function registerPhpEngine($resolver) { $resolver->register('php', function () { return new PhpEngine(); }); }