public function loadTemplate($target) { $params = Request::parseTarget($target); if ($params != false) { extract($params); $ctrl_path = BUNDLE . $bundle . '/controller/' . $controller . 'Controller.php'; if (file_exists($ctrl_path)) { $params->bundle = $bundle; $params->prefix = ''; $params->controller = $controller; $params->namespace = '\\' . Config::$app_namespace . '\\' . ucfirst($params->bundle) . 'Bundle\\Controller\\' . ucfirst($params->bundle) . '\\'; $params->method = $method; $params->params = new Collection(); $controller = $params->namespace . $controller . 'Controller'; require_once $ctrl_path; $ctrl = new $controller($params, false, true); return $ctrl->template; } else { return false; } } else { return false; } }