-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathServerNormalizerInterface.php
42 lines (35 loc) · 1.16 KB
/
ServerNormalizerInterface.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
<?php
declare(strict_types=1);
namespace HttpSoft\ServerRequest;
use Psr\Http\Message\UriInterface;
interface ServerNormalizerInterface
{
/**
* Returns a normalized request method from server parameters.
*
* @param array $server if PHP SAPI is used, it is $_SERVER.
* @return string request method.
*/
public function normalizeMethod(array $server): string;
/**
* Returns a normalized protocol version from server parameters.
*
* @param array $server if PHP SAPI is used, it is $_SERVER.
* @return string protocol version.
*/
public function normalizeProtocolVersion(array $server): string;
/**
* Returns a normalized request URI from server parameters.
*
* @param array $server if PHP SAPI is used, it is $_SERVER.
* @return UriInterface instance.
*/
public function normalizeUri(array $server): UriInterface;
/**
* Returns a primary normalized headers from server parameters.
*
* @param array $server if PHP SAPI is used, it is $_SERVER.
* @return array `name => value` header pairs.
*/
public function normalizeHeaders(array $server): array;
}