<?php

namespace ProxiumWXfrm\Http;

//use ProxiumWXfrm\Server\Server;
use ProxiumWXfrm\Server\PhpNativeServer;

class Request
{
    protected string $uri;
    //protected HttpMethod $method;
    protected string $method;
    protected array $data;
    protected array $files;
    protected array $query;

    public function __construct(PhpNativeServer $server) {
        $this->uri = $server->requestUri();  
        $this->method = $server->requestMethod();  
        $this->data = $server->postData();  
        $this->files = $server->files();  
        $this->query = $server->queryParams();
    }

    public function uri():string{
        return $this->uri;
    }
    
    //public function method():HttpMethod{
    public function method():string{
        return $this->method;
    }

    public function Data():array{
        return $this->data;
    }

    public function Files():array{
        return $this->files;
    }

    public function QueryParams():array{
        return $this->query;
    }

    public function setQueryParams($parametros){
        $this->query=$parametros;
    }
     
}
