1 | <?php |
||
14 | class UriValidator |
||
15 | { |
||
16 | /** |
||
17 | * Validate Uri port. |
||
18 | * Value can be null or integer between 1 and 65535. |
||
19 | * |
||
20 | * @param null|int $port The Uri port number. |
||
21 | * |
||
22 | * @return null|int |
||
23 | * |
||
24 | * @throws InvalidArgumentException If the port is invalid. |
||
25 | */ |
||
26 | 5 | public function validatePort($port) |
|
34 | |||
35 | /** |
||
36 | * Validate Uri path. |
||
37 | * |
||
38 | * Path must NOT contain query string or URI fragment. It can be object, |
||
39 | * but then the class must implement __toString method. |
||
40 | * |
||
41 | * @param string|object $path The Uri path |
||
42 | * |
||
43 | * @return void |
||
44 | * |
||
45 | * @throws InvalidArgumentException If the path is invalid. |
||
46 | */ |
||
47 | 7 | public function validatePath($path) |
|
58 | |||
59 | /** |
||
60 | * Validate query. |
||
61 | * |
||
62 | * Path must NOT contain URI fragment. It can be object, |
||
63 | * but then the class must implement __toString method. |
||
64 | * |
||
65 | * @param string|object $query The query path |
||
66 | * |
||
67 | * @return void |
||
68 | * |
||
69 | * @throws InvalidArgumentException If the query is invalid. |
||
70 | */ |
||
71 | 14 | public function validateQuery($query) |
|
85 | } |
||
86 |