public function render($file = NULL)
{
if ($file !== NULL) {
$this->set_filename($file);
}
if (empty($this->_file)) {
throw new Kohana_View_Exception('You must set the file to use within your view before rendering');
}
// Combine local and global data and capture the output
return $this->_environment->loadTemplate($this->path())->render($this->as_array());
}