/** * {@inheritdoc} * * @param ViewBaseInterface $view * @param DiInterface $di * @param array $options * @param array $userFunctions */ public function __construct(ViewBaseInterface $view, DiInterface $di = null, $options = array(), $userFunctions = array()) { $loader = new \Twig_Loader_Filesystem($view->getViewsDir()); $this->twig = new Twig\Environment($di, $loader, $options); $this->twig->addExtension(new Twig\CoreExtension()); $this->registryFunctions($view, $di, $userFunctions); parent::__construct($view, $di); }
public function __construct(\Phalcon\Mvc\ViewBaseInterface $view, \Phalcon\DiInterface $di = null) { $loader = new Twig_Loader_Filesystem($view->getViewsDir()); $this->_twig = new Twig_Environment($loader); parent::__construct($view, $di); }
/** * Twig constructor. * * @param ViewBaseInterface $view * @param DiInterface|null $dependencyInjector */ public function __construct(ViewBaseInterface $view, DiInterface $dependencyInjector = null) { $this->twig = new Twig_Environment(new Twig_Loader_Filesystem($view->getViewsDir())); parent::__construct($view, $dependencyInjector); }