src/Theme.php
public function theme($theme = null)
    {
        // If theme name is not set, so use default from config.
        if ($theme != false) {
            $this->theme = $theme;
        }

        // Is theme ready?
        if (! $this->exists($theme)) {
            throw new UnknownThemeException("Theme [$theme] not found.");
        }

        // Add location to look up view.
        $this->addPathLocation($this->path());

        // Fire event before set up a theme.
        $this->fire('before', $this);

        // Before from a public theme config.
        $this->fire('appendBefore', $this);

        // Add asset path to asset container.
        $this->asset->addPath($this->path().'/'.$this->getConfig('containerDir.asset'));

        return $this;
    }
public function theme($theme = null)
    {
        // If theme name is not set, so use default from config.
        if ($theme != false) {
            $this->theme = $theme;
        }

        // Is theme ready?
        if (! $this->exists($theme)) {
            throw new UnknownThemeException("Theme [$theme] not found.");
        }

        // Add location to look up view.
        $this->addPathLocation($this->path());

        // Fire event before set up a theme.
        $this->fire('before', $this);

        // Before from a public theme config.
        $this->fire('appendBefore', $this);

        // Add asset path to asset container.
        $this->asset->addPath($this->path().'/'.$this->getConfig('containerDir.asset'));

        return $this;
    }
public function theme ( $ theme = null ) { // If theme name is not set, so use default from config. if ( $ theme != false ) { $ this -> theme = $ theme ; } // Is theme ready? if ( ! $ this -> exists ( $ theme ) ) { throw new UnknownThemeException ( "Theme [$theme] not found." ) ; } // Add location to look up view. $ this -> addPathLocation ( $ this -> path ( ) ) ; // Fire event before set up a theme. $ this -> fire ( 'before' , $ this ) ; // Before from a public theme config. $ this -> fire ( 'appendBefore' , $ this ) ; // Add asset path to asset container. $ this -> asset -> addPath ( $ this -> path ( ) . '/' . $ this -> getConfig ( 'containerDir.asset' ) ) ; return $ this ; }
Set up a theme name.

@param  string $theme
@throws UnknownThemeException
@return Theme
Set up a theme name .