Phly\Http\ServerRequest::__construct PHP Method

__construct() public method

public __construct ( array $serverParams = [], array $uploadedFiles = [], null | string $uri = null, null | string $method = null, string | resource | Psr\Http\Message\StreamInterface $body = 'php://input', array $headers = [] )
$serverParams array Server parameters, typically from $_SERVER
$uploadedFiles array Upload file information, a tree of UploadedFiles
$uri null | string URI for the request, if any.
$method null | string HTTP method for the request, if any.
$body string | resource | Psr\Http\Message\StreamInterface Message body, if any.
$headers array Headers for the message, if any.
    public function __construct(array $serverParams = [], array $uploadedFiles = [], $uri = null, $method = null, $body = 'php://input', array $headers = [])
    {
        $this->validateUploadedFiles($uploadedFiles);
        $body = $this->getStream($body);
        $this->initialize($uri, $method, $body, $headers);
        $this->serverParams = $serverParams;
        $this->uploadedFiles = $uploadedFiles;
    }