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();
}