fuel/fuel/core/classes/view.php
public function render($file = null)
	{
		// reactivate the correct request
		if (class_exists('Request', false))
		{
			$current_request = \Request::active();
			\Request::active($this->active_request);
		}

		// store the current language, and set the correct render language
		if ($this->active_language)
		{
			$current_language = \Config::get('language', 'en');
			\Config::set('language', $this->active_language);
		}

		// override the view filename if needed
		if ($file !== null)
		{
			$this->set_filename($file);
		}

		// and make sure we have one
		if (empty($this->file_name))
		{
			throw new \FuelException('You must set the file to use within your view before rendering');
		}

		// combine local and global data and capture the output
		$return = $this->process_file();

		// restore the current language setting
		$this->active_language and \Config::set('language', $current_language);

		// and the active request class
		if (isset($current_request))
		{
			\Request::active($current_request);
		}

		return $return;
	}
public function render($file = null)
	{
		// reactivate the correct request
		if (class_exists('Request', false))
		{
			$current_request = \Request::active();
			\Request::active($this->active_request);
		}

		// store the current language, and set the correct render language
		if ($this->active_language)
		{
			$current_language = \Config::get('language', 'en');
			\Config::set('language', $this->active_language);
		}

		// override the view filename if needed
		if ($file !== null)
		{
			$this->set_filename($file);
		}

		// and make sure we have one
		if (empty($this->file_name))
		{
			throw new \FuelException('You must set the file to use within your view before rendering');
		}

		// combine local and global data and capture the output
		$return = $this->process_file();

		// restore the current language setting
		$this->active_language and \Config::set('language', $current_language);

		// and the active request class
		if (isset($current_request))
		{
			\Request::active($current_request);
		}

		return $return;
	}
public function render ( $ file = null ) { // reactivate the correct request if ( class_exists ( 'Request' , false ) ) { $ current_request = \ Request :: active ( ) ; \ Request :: active ( $ this -> active_request ) ; } // store the current language, and set the correct render language if ( $ this -> active_language ) { $ current_language = \ Config :: get ( 'language' , 'en' ) ; \ Config :: set ( 'language' , $ this -> active_language ) ; } // override the view filename if needed if ( $ file !== null ) { $ this -> set_filename ( $ file ) ; } // and make sure we have one if ( empty ( $ this -> file_name ) ) { throw new \ FuelException ( 'You must set the file to use within your view before rendering' ) ; } // combine local and global data and capture the output $ return = $ this -> process_file ( ) ; // restore the current language setting $ this -> active_language and \ Config :: set ( 'language' , $ current_language ) ; // and the active request class if ( isset ( $ current_request ) ) { \ Request :: active ( $ current_request ) ; } return $ return ; }
Renders the view object to a string. Global and local data are merged
and extracted to create local variables within the view file.

$output = $view->render();

[!!] Global variables with the same key name as local variables will be
overwritten by the local variable.

@param    string  view filename
@return   string
@throws   FuelException
@uses     static::capture
Renders the view object to a string . Global and local data are merged and extracted to create local variables within the view file .