src/Framework/Request.php
@@ -5,8 +5,26 @@ namespace Framework; class Request { public function __construct(public string $uri, public string $method) { public function __construct(public string $uri, public string $method, public array $get, public array $post, public array $files, public array $cookie, public array $server) { } public static function createFromGlobals() { return new static( $_SERVER["REQUEST_URI"], $_SERVER["REQUEST_METHOD"], $_GET, $_POST, $_FILES, $_COOKIE, $_SERVER ); } }