Habari\Theme::__construct PHP Method

__construct() public method

If no parameter is supplied, then the constructor Loads the active theme from the database. If no theme option is set, a fatal error is thrown
public __construct ( $themedata )
    public function __construct($themedata)
    {
        $this->name = $themedata->name;
        $this->version = $themedata->version;
        $theme_dir = Utils::single_array($themedata->theme_dir);
        // Set up the corresponding engine to handle the templating
        $engine = $themedata->template_engine;
        // @todo Big namespace Kludge. Prefixes the template engine with a namespace if not provided
        if (strpos($engine, '\\') == false) {
            $engine = 'Habari\\' . $engine;
        }
        $this->template_engine = new $engine();
        $this->theme_dir = $theme_dir;
        $this->template_engine->queue_dirs($theme_dir);
        $this->plugin_id = $this->plugin_id();
        $this->load();
    }