-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServerRequest.php
51 lines (45 loc) · 1.17 KB
/
ServerRequest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Qubus\Http
*
* @link https://github.com/QubusPHP/http
* @copyright 2020
* @author Joshua Parker <[email protected]>
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
declare(strict_types=1);
namespace Qubus\Http;
use Laminas\Diactoros\ServerRequest as BaseServerRequest;
use Psr\Http\Message\ServerRequestInterface;
final class ServerRequest extends BaseServerRequest implements ServerRequestInterface
{
public function __construct(
array $serverParams = [],
array $uploadedFiles = [],
$uri = null,
?string $method = null,
$body = 'php://input',
array $headers = [],
array $cookies = [],
array $queryParams = [],
$parsedBody = null,
string $protocol = '1.1'
) {
parent::__construct(
$serverParams,
$uploadedFiles,
$uri,
$method,
$body,
$headers,
$cookies,
$queryParams,
$parsedBody,
$protocol
);
}
public function get(mixed $name): mixed
{
return $this->getParsedBody()[$name];
}
}