routers[] = [$method,$url,$action]; } private function getRequestMethod() { return $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; } public function get($url,$action) { $this->addRouter('GET',$url,$action); } public function map() { $requestURL = $this->getRequestURL(); $requestMethod = $this->getRequestMethod(); $routers = $this->routers; foreach ($routers as $route) { list($method,$url,$action) = $route; var_dump($action); } return; } public function Route() { $this->map(); } } ?>