1 | <?php |
||
10 | class Uri implements UriInterface |
||
11 | { |
||
12 | |||
13 | |||
14 | private $scheme; |
||
15 | |||
16 | public function withScheme($value) |
||
21 | |||
22 | public function getScheme() |
||
26 | |||
27 | private $username; |
||
28 | private $password; |
||
29 | |||
30 | public function withUserInfo($user, $password = null) |
||
36 | |||
37 | public function getUserInfo() |
||
42 | |||
43 | /** |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function getUsername() |
||
50 | |||
51 | /** |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function getPassword() |
||
58 | |||
59 | private $host; |
||
60 | |||
61 | public function withHost($value) |
||
66 | |||
67 | public function getHost() |
||
71 | |||
72 | private $port; |
||
73 | |||
74 | /** |
||
75 | * @param int|string|null $value |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function withPort($value) |
||
83 | |||
84 | public function getPort() |
||
88 | |||
89 | private $path; |
||
90 | |||
91 | public function withPath($value) |
||
96 | |||
97 | public function getPath() |
||
101 | |||
102 | private $query = []; |
||
103 | |||
104 | public function withQuery($query) |
||
109 | |||
110 | |||
111 | public function getQuery() |
||
115 | |||
116 | /** |
||
117 | * @param string $key |
||
118 | * @param string|array $value |
||
119 | * @param bool $isEncoded |
||
120 | * @return $this |
||
121 | */ |
||
122 | public function withQueryKeyValue($key, $value, $isEncoded = false) |
||
127 | |||
128 | /** |
||
129 | * Not from UriInterface |
||
130 | * |
||
131 | * @param $key |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getQueryPart($key) |
||
138 | |||
139 | private function getFromArray($array, $key) |
||
147 | |||
148 | private $fragment; |
||
149 | |||
150 | public function getFragment() |
||
154 | |||
155 | public function withFragment($fragment) |
||
160 | |||
161 | public function getAuthority() |
||
168 | |||
169 | public function __toString() |
||
178 | |||
179 | private function concatSuffix($str, $suffix) |
||
186 | |||
187 | private function concatPrefix($prefix, $str) |
||
194 | |||
195 | /** |
||
196 | * @param string $uri |
||
197 | */ |
||
198 | public function __construct($uri = null) |
||
229 | |||
230 | public static function getInstanceFromString($uriString = null) |
||
234 | |||
235 | public static function getInstanceFromUri(UriInterface $uri) |
||
239 | } |
||
240 |