public function config()
    {
        if (!$this->config) {
            $config = array();

            $configFile = $this->getThemesPath()
                .DIRECTORY_SEPARATOR.$this->getName()
                .DIRECTORY_SEPARATOR.'theme.config.php';
            if (file_exists($configFile)) {
                ob_start();
                set_error_handler(
                    function($errno, $errstr) {
                        throw new \ErrorException($errstr, $errno);
                    },
                    E_ALL
                );

                $config = include $configFile;

                restore_error_handler();
                ob_get_clean();

                if (!is_array($config))
                    throw new \Exception('Invalid "'.$this->getName().'" Theme Config File. It must return array.');
            }

            $this->config = new Entity($config);
        }

        return $this->config;
    }
public function config()
    {
        if (!$this->config) {
            $config = array();

            $configFile = $this->getThemesPath()
                .DIRECTORY_SEPARATOR.$this->getName()
                .DIRECTORY_SEPARATOR.'theme.config.php';
            if (file_exists($configFile)) {
                ob_start();
                set_error_handler(
                    function($errno, $errstr) {
                        throw new \ErrorException($errstr, $errno);
                    },
                    E_ALL
                );

                $config = include $configFile;

                restore_error_handler();
                ob_get_clean();

                if (!is_array($config))
                    throw new \Exception('Invalid "'.$this->getName().'" Theme Config File. It must return array.');
            }

            $this->config = new Entity($config);
        }

        return $this->config;
    }
public function config ( ) { if ( ! $ this -> config ) { $ config = array ( ) ; $ configFile = $ this -> getThemesPath ( ) . DIRECTORY_SEPARATOR . $ this -> getName ( ) . DIRECTORY_SEPARATOR . 'theme.config.php' ; if ( file_exists ( $ configFile ) ) { ob_start ( ) ; set_error_handler ( function ( $ errno , $ errstr ) { throw new \ ErrorException ( $ errstr , $ errno ) ; } , E_ALL ) ; $ config = include $ configFile ; restore_error_handler ( ) ; ob_get_clean ( ) ; if ( ! is_array ( $ config ) ) throw new \ Exception ( 'Invalid "' . $ this -> getName ( ) . '" Theme Config File. It must return array.' ) ; } $ this -> config = new Entity ( $ config ) ; } return $ this -> config ; }
Get Theme Config Object Entity

@throws \Exception
@return Entity
Get Theme Config Object Entity