5use GuzzleHttp\Psr7\Uri;
6use Psr\Http\Message\StreamInterface;
7use Psr\Http\Message\UploadedFileInterface;
8use Psr\Http\Message\UriInterface;
15 private readonly
string $method;
20 private string $protocolVersion;
26 private $serverParams;
29 private $cookieParams;
35 private $uploadedFiles;
59 $this->method = $params[
'method'] ??
'GET';
60 $this->uri = $params[
'uri'] ??
new Uri;
61 $this->protocolVersion = $params[
'protocolVersion'] ??
'1.1';
62 $this->body =
new StringStream( $params[
'bodyContents'] ??
'' );
63 $this->serverParams = $params[
'serverParams'] ?? [];
64 $this->cookieParams = $params[
'cookieParams'] ?? [];
65 $this->queryParams = $params[
'queryParams'] ?? [];
66 $this->uploadedFiles = $params[
'uploadedFiles'] ?? [];
67 $this->postParams = $params[
'postParams'] ?? [];
71 parent::__construct( $params[
'cookiePrefix'] ??
'' );
86 return $this->protocolVersion;
96 return $this->serverParams;
101 return $this->cookieParams;
106 return $this->queryParams;
111 return $this->uploadedFiles;
116 return $this->postParams;
125 if ( $this->parsedBody !==
null ) {
129 if ( $this->postParams !== [] ) {
133 if ( $this->
getBody()->getSize() > 0 ) {
if(!defined('MW_SETUP_CALLBACK'))