fuel/fuel/core/classes/theme.php
protected function set_theme($theme = null, $type = 'active')
	{
		// set the theme if given
		if ($theme !== null)
		{
			// remove the defined theme asset paths from the asset instance
			empty($this->active['asset_path']) or $this->asset->remove_path($this->active['asset_path']);
			empty($this->fallback['asset_path']) or $this->asset->remove_path($this->fallback['asset_path']);

			$this->{$type} = $this->create_theme_array($theme);

			// add the asset paths to the asset instance
			empty($this->fallback['asset_path']) or $this->asset->add_path($this->fallback['asset_path']);
			empty($this->active['asset_path']) or $this->asset->add_path($this->active['asset_path']);
		}

		// and return the theme config
		return $this->{$type};
	}
protected function set_theme($theme = null, $type = 'active')
	{
		// set the theme if given
		if ($theme !== null)
		{
			// remove the defined theme asset paths from the asset instance
			empty($this->active['asset_path']) or $this->asset->remove_path($this->active['asset_path']);
			empty($this->fallback['asset_path']) or $this->asset->remove_path($this->fallback['asset_path']);

			$this->{$type} = $this->create_theme_array($theme);

			// add the asset paths to the asset instance
			empty($this->fallback['asset_path']) or $this->asset->add_path($this->fallback['asset_path']);
			empty($this->active['asset_path']) or $this->asset->add_path($this->active['asset_path']);
		}

		// and return the theme config
		return $this->{$type};
	}
protected function set_theme ( $ theme = null , $ type = 'active' ) { // set the theme if given if ( $ theme !== null ) { // remove the defined theme asset paths from the asset instance empty ( $ this -> active [ 'asset_path' ] ) or $ this -> asset -> remove_path ( $ this -> active [ 'asset_path' ] ) ; empty ( $ this -> fallback [ 'asset_path' ] ) or $ this -> asset -> remove_path ( $ this -> fallback [ 'asset_path' ] ) ; $ this -> { $ type } = $ this -> create_theme_array ( $ theme ) ; // add the asset paths to the asset instance empty ( $ this -> fallback [ 'asset_path' ] ) or $ this -> asset -> add_path ( $ this -> fallback [ 'asset_path' ] ) ; empty ( $ this -> active [ 'asset_path' ] ) or $ this -> asset -> add_path ( $ this -> active [ 'asset_path' ] ) ; } // and return the theme config return $ this -> { $ type } ; }
Sets a  theme.

@param   string  $theme  Theme name to set active
@param   string  $type   name of the internal theme array to set
@return  array   The theme array
@throws  \ThemeException
Sets a theme .