controller = new $modname(); } $routes = Route::get(); if ($routes) { foreach ($routes as $route) { if (is_array($route) && strtolower($route[1]) === strtolower(argv(0)) . '/' . strtolower(argv($whicharg))) { include_once($route[0]); if (class_exists($modname)) { $this->controller = new $modname; } } } } } /** * @brief * * @param string $method * @return boolean|mixed */ function call($method) { if (! $this->controller) { return false; } if (method_exists($this->controller, $method)) { return $this->controller->$method(); } return false; } }