| Total Complexity | 7 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Request |
||
| 6 | { |
||
| 7 | private $host; |
||
| 8 | private $path; |
||
| 9 | private $userAgent; |
||
| 10 | private $referer; |
||
| 11 | private $scheme; |
||
| 12 | private $method; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string $host Host of the URI instance |
||
| 16 | * @param string $path Path of the URI instance |
||
| 17 | * @param string $userAgent User-Agent header of the request |
||
| 18 | * @param string $referer Referer header of the request |
||
| 19 | * @param string $scheme "http" or "https" |
||
| 20 | * @param string $method GET / POST / PUT / ... |
||
| 21 | */ |
||
| 22 | public function __construct($host, $path, $userAgent = '', $referer = '', $scheme = 'http', $method = '') |
||
| 23 | { |
||
| 24 | $this->host = $host; |
||
| 25 | $this->path = $path; |
||
| 26 | $this->userAgent = $userAgent; |
||
| 27 | $this->referer = $referer; |
||
| 28 | $this->scheme = $scheme; |
||
| 29 | $this->method = $method; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getHost() |
||
| 33 | { |
||
| 34 | return $this->host; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getPath() |
||
| 38 | { |
||
| 39 | return $this->path; |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getUserAgent() |
||
| 43 | { |
||
| 44 | return $this->userAgent; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getReferer() |
||
| 50 | } |
||
| 51 | |||
| 52 | public function getScheme() |
||
| 53 | { |
||
| 54 | return $this->scheme; |
||
| 55 | } |
||
| 56 | |||
| 57 | public function getMethod() |
||
| 60 | } |
||
| 61 | } |
||
| 62 |