admin)) { throw new Exception("@todo UNAUTHORIZED", 401); } parent::__construct(); } public function __call($controller_name, $args) { if ($controller_name == "index") { $controller_name = "dashboard"; } $controller = "Admin_{$controller_name}_Controller"; $controller = new $controller; if ($args) { $method = array_unshift($args); } else { $method = "index"; } $theme_name = module::get_var("core", "active_admin_theme", "admin_default"); $template = new Admin_View("admin.html", $theme_name); $template->content = call_user_func_array(array(new $controller, $method), $args); print $template; } }