progetto fatto precedentemente adattato al framework creato con il corso
filippo.bertilotti
2024-06-10 3e685fa675e58af50c45a2c1f8a3f35ff5f16ddf
commit | author | age
15e03a 1 <?php
F 2
3 declare(strict_types= 1);
4
5 namespace Framework;
6
7 class Request {
8     public function __construct(public string $uri,
9                                 public string $method,
10                                 public array $get,
11                                 public array $post,
12                                 public array $files,
13                                 public array $cookie,
14                                 public array $server) {
15         
16     }
17
18     public static function createFromGlobals() {
19         return new static(
20             $_SERVER["REQUEST_URI"],
21             $_SERVER["REQUEST_METHOD"],
22             $_GET,
23             $_POST,
24             $_FILES,
25             $_COOKIE,
26             $_SERVER
27         );
28     }
29 }
30