body = $_REQUEST; $this->method = $_SERVER['REQUEST_METHOD']; $this->headers = getallheaders() ?? []; } public function set($field, $value): void { $this->body[$field] = $value; } public function get($field) { return $this->body[$field]; } public function files(): array { return $_FILES; } public function __get($key) { if (array_key_exists($key, $this->body)) { return $this->body[$key]; } throw new Error('Acessing a non-existent property'); } }