} if (!strlen($path) && !strlen($uri)) { if (null !== $route->getRedirect()) { Router::redirect('/' . $route->getRedirect()); } Router::make($route); return true; } $matched = Router::match($path, $route, $uri); if (false === $matched || !count($matched)) { continue; } else { if (null !== $route->getRedirect()) { Router::redirect('/' . $route->getRedirect()); } Router::make($route); return true; } } } }); context()->isPost(function ($except = array()) { if (count($_POST) && count($except)) { foreach ($except as $key) { if (Arrays::exists($key, $_POST)) { unset($_POST[$key]); } } } return count($_POST) ? true : false; });
/** * Run the application * * @return void */ public function run() { $response = $this->router->make(); $this->renderAction($response); }