public function __construct(\Phalcon\Mvc\ViewBaseInterface $view, \Phalcon\DiInterface $di) { parent::__construct($view, $di); require CORE_PATH . 'config/volt.functions.php'; foreach ($voltFunctions as $macro => $function) { $this->getCompiler()->addFunction($macro, $function); } $this->getCompiler()->setOptions(array('stat' => true, 'compileAlways' => true)); }
public function __construct(ViewBaseInterface $view, DiInterface $di = null) { parent::__construct($view, $di); $debug = false; if (config()->app->debug) { $debug = true; } $this->setOptions(['compiledSeparator' => '_', 'compiledPath' => storage_path('views') . '/', 'compileAlways' => $debug]); foreach ($this->functions as $func) { $this->getCompiler()->addFunction($func, $func); } }
public function __construct(ViewBaseInterface $view, DiInterface $dependencyInjector, $development = true, $prefix = '') { parent::__construct($view, $dependencyInjector); $this->setOptions(['compiledPath' => function ($templatePath) use($view, $development, $prefix) { $dir = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'volt-cache'; if (!is_dir($dir)) { mkdir($dir); } if ($prefix !== '') { $prefix .= '%'; } return $dir . DIRECTORY_SEPARATOR . $prefix . str_replace(DIRECTORY_SEPARATOR, '%', str_replace($view->getViewsDir(), '', $templatePath)) . '.php'; }, 'compileAlways' => $development]); }
public function __construct($a, $b) { // $this->log = new \Phalcon\Logger\Adapter\File(getcwd().'/view.log'); parent::__construct($a, $b); }
public function __construct($view, $dependencyInjector = null) { parent::__construct($view, $dependencyInjector); }