/** * @param string $template * @param array $data */ public function __construct($template, array $data = array()) { parent::__construct($template, $data); $conf = Config::get('view.haanga'); $options = ['debug' => $conf['debug'], 'template_dir' => $this->path, 'autoload' => $conf['auto_reload']]; if ($conf['cache'] === true) { $options['cache_dir'] = $this->path . '/haanga_cache'; } require_once BASE_PATH . "Haanga/lib/Haanga.php"; \Haanga::configure($options); }
/** * @param string $template * @param array $data */ public function __construct($template, array $data = array()) { parent::__construct($template, $data); $conf = Registry::get('conf'); $options = array('debug' => Value::ensureBoolean($conf['view']['haanga']['debug']), 'template_dir' => $this->path, 'autoload' => Value::ensureBoolean($conf['view']['haanga']['auto_reload'])); if ($conf['view']['haanga']['cache'] === true) { $options['cache_dir'] = $this->path . '/haanga_cache'; } require_once BASE_PATH . "Haanga/lib/Haanga.php"; \Haanga::configure($options); }