/** * Initiate a new template using make * * Example: * <code>$template = \Hybrid\Template_Frontend::make();</code> * * @static * @access public * @param string $name * @return Template_Frontend * @throws \FuelException */ public static function __callStatic($method, array $arguments) { if (!in_array($method, array('factory', 'forge', 'make'))) { throw new FuelException(__CLASS__ . '::' . $method . '() does not exist.'); } $name = empty($arguments) ? null : $arguments[0]; $driver = 'frontend'; $name = strtolower($name); if (!empty($name)) { $driver .= ".{$name}"; } return Template::make($driver); }
/** * Prepare template * * @access protected * @return void */ protected function prepare_template() { if (true === $this->auto_render) { $this->template = Template::make($this->template); } }