/** * Load an existing controller if there IS a GET parameter passed * * @return boolean|string */ private function _loadExistsController() { $this->_controllerPath .= $this->_controller . '.php'; if (file_exists($this->_controllerPath)) { require_once $this->_controllerPath; if (class_exists($this->_controller)) { $this->_controller = new $this->_controller(); } else { Exception::Controller($this->_controllerPath); } } else { Exception::createController($this->_controller); } if (isset($this->method)) { if (method_exists($this->_controller, $this->method)) { if (isset($this->parems)) { call_user_func(array($this->_controller, $this->method), $this->parems); } else { call_user_func(array($this->_controller, $this->method)); } } else { // $this->_controller->index($this->parems); try { $this->_controller->index($this->parems); } catch (Exception $ex) { Exception::indexController($this->_controllerPath); } // } } else { } }