Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function extract(RequestInterface $request, array $requestOptions) |
||
24 | { |
||
25 | if (array_key_exists(self::OPTION_KEY, $requestOptions)) { |
||
26 | return $requestOptions[self::OPTION_KEY]; |
||
27 | } |
||
28 | |||
29 | $header = $request->getHeader(self::HEADER_NAME); |
||
30 | if (count($header)) { |
||
31 | return $header[0]; |
||
32 | } |
||
33 | |||
34 | return $request->getUri()->getHost(); |
||
35 | } |
||
37 |