1 | <?php |
||
10 | class UriFactory implements UriFactoryInterface |
||
11 | { |
||
12 | /** |
||
13 | * Factory method to build a URI from a super-global $_SERVER array. |
||
14 | * |
||
15 | * @return UriInterface |
||
16 | */ |
||
17 | public function createFromSuperGlobalArray(array $_server) |
||
31 | |||
32 | /** |
||
33 | * @param string $absoluteUri |
||
34 | * |
||
35 | * @return UriInterface |
||
36 | */ |
||
37 | public function createFromAbsolute($absoluteUri) |
||
41 | |||
42 | /** |
||
43 | * Factory method to build a URI from parts. |
||
44 | * |
||
45 | * @param string $scheme |
||
46 | * @param string $userInfo |
||
47 | * @param string $host |
||
48 | * @param string $port |
||
49 | * @param string $path |
||
50 | * @param string $query |
||
51 | * @param string $fragment |
||
52 | * |
||
53 | * @return UriInterface |
||
54 | */ |
||
55 | public function createFromParts($scheme, $userInfo, $host, $port, $path = '', $query = '', $fragment = '') |
||
68 | |||
69 | /** |
||
70 | * @param array $_server |
||
71 | * |
||
72 | * @return null|UriInterface |
||
73 | */ |
||
74 | private function attemptProxyStyleParse($_server) |
||
85 | |||
86 | /** |
||
87 | * @param array $_server |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | private function detectPath($_server) |
||
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | private function detectHost(array $_server) |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | private function detectPort(array $_server) |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | private function detectQuery(array $_server) |
||
138 | |||
139 | /** |
||
140 | * Determine URI scheme component from superglobal array. |
||
141 | * |
||
142 | * When using ISAPI with IIS, the value will be "off" if the request was |
||
143 | * not made through the HTTPS protocol. As a result, we filter the |
||
144 | * value to a bool. |
||
145 | * |
||
146 | * @param array $_server A super-global $_SERVER array |
||
147 | * |
||
148 | * @return string Returns http or https depending on the URI scheme |
||
149 | */ |
||
150 | private function detectScheme(array $_server) |
||
158 | } |
||
159 |