Route added
This commit is contained in:
parent
44933a4449
commit
d4cf0fd331
|
@ -151,6 +151,16 @@
|
|||
return Route::$current;
|
||||
}
|
||||
|
||||
public static function Execute()
|
||||
{
|
||||
$route = Route::CheckCurrent();
|
||||
if($route === false)
|
||||
{
|
||||
Response::Code(404);
|
||||
};
|
||||
$route->call();
|
||||
}
|
||||
|
||||
public static function from(...$args)
|
||||
{
|
||||
return new Route(...$args);
|
||||
|
@ -173,6 +183,11 @@
|
|||
{
|
||||
$this->match = null;
|
||||
}
|
||||
public function call(...$args)
|
||||
{
|
||||
$callback = $this->callback;
|
||||
$callback(...$args);
|
||||
}
|
||||
public function Run()
|
||||
{
|
||||
$requestUrl = Request::$url;
|
||||
|
|
Loading…
Reference in New Issue