Conditions | 5 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function getScheme() |
||
15 | { |
||
16 | $server = $this->getServer(); |
||
17 | if (!isset($this->scheme)) { |
||
18 | if (array_key_exists('HTTPS', $server) && strcasecmp($server['HTTPS'], 'off') != 0) { |
||
19 | $scheme = 'https'; |
||
20 | } elseif (array_key_exists('REQUEST_SCHEME', $server)) { |
||
21 | $scheme = $server['REQUEST_SCHEME']; |
||
22 | } else { |
||
23 | $scheme = 'http'; |
||
24 | } |
||
25 | return $this->scheme = $scheme; |
||
26 | } |
||
62 |