public function render($class, $template = NULL) { if (!empty($class->_partials)) { $partials = array(); foreach ($class->_partials as $key => $value) { $partials[$key] = file_get_contents(Kohana::find_file('templates', $value, 'mustache')); } $this->_engine->setPartials($partials); } return parent::render($class, $template); }
/** * Renders the template using the current view. * * @return string */ public function render() { $this->charset = Kohana::$charset; $this->lang = I18n::$lang; $this->production = Kohana::$environment === Kohana::PRODUCTION; if (Kohana::$profiling === true) { // Start a new benchmark $benchmark = Profiler::start('Layout', __FUNCTION__); } $rendered = parent::render(); if (isset($benchmark)) { // Stop the benchmark Profiler::stop($benchmark); } return $rendered; }