1 | <?php |
||
17 | class SchemaHost |
||
18 | { |
||
19 | /** |
||
20 | * @var ServerBag |
||
21 | */ |
||
22 | private $server; |
||
23 | |||
24 | /** |
||
25 | * Constructor. |
||
26 | * |
||
27 | * @param ServerBag $server |
||
28 | */ |
||
29 | public function __construct(ServerBag $server) |
||
33 | |||
34 | /** |
||
35 | * Get schema and http host. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public function getSchemaAndHttpHost() |
||
43 | |||
44 | /** |
||
45 | * Get http host and port if not standard. |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getHttpHost() |
||
60 | |||
61 | /** |
||
62 | * Get server host. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getHost() |
||
72 | |||
73 | /** |
||
74 | * Get server port. |
||
75 | * |
||
76 | * @return int |
||
77 | */ |
||
78 | public function getPort() |
||
82 | |||
83 | /** |
||
84 | * Get http schema. |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | public function getSchema() |
||
92 | |||
93 | /** |
||
94 | * Check if server request is secure (https) or not. |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | public function isSecure() |
||
104 | } |
||
105 |