1 | <?php |
||
5 | class Url |
||
6 | { |
||
7 | /** @var null|string */ |
||
8 | public $scheme; |
||
9 | |||
10 | /** @var null|string */ |
||
11 | public $host; |
||
12 | |||
13 | /** @var int */ |
||
14 | public $port = 80; |
||
15 | |||
16 | /** @var null|string */ |
||
17 | public $path; |
||
18 | |||
19 | /** @var null|string */ |
||
20 | public $query; |
||
21 | |||
22 | /** @var null|string */ |
||
23 | protected $toString; |
||
24 | |||
25 | /** |
||
26 | * @param string $url |
||
27 | * |
||
28 | * @return static |
||
29 | */ |
||
30 | public static function create(string $url) |
||
34 | |||
35 | public function __construct(string $url) |
||
45 | |||
46 | public function isRelative(): bool |
||
50 | |||
51 | public function isProtocolIndependent(): bool |
||
55 | |||
56 | public function hasCrawlableScheme(): bool |
||
60 | |||
61 | /** |
||
62 | * @param string $scheme |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function setScheme(string $scheme) |
||
73 | |||
74 | /** |
||
75 | * @param string $host |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function setHost(string $host) |
||
86 | |||
87 | /** |
||
88 | * @param $port |
||
89 | * |
||
90 | * @return $this |
||
91 | */ |
||
92 | public function setPort(int $port) |
||
99 | |||
100 | /** |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function removeFragment() |
||
110 | |||
111 | /** |
||
112 | * @param $path |
||
113 | * |
||
114 | * @return $this |
||
115 | */ |
||
116 | public function setPath(string $path) |
||
123 | |||
124 | /** |
||
125 | * @return null|string |
||
126 | */ |
||
127 | public function path() |
||
131 | |||
132 | /** |
||
133 | * @deprecated This function is not being used internally anymore and will be removed in the next major version. |
||
134 | * |
||
135 | * @return null|string |
||
136 | */ |
||
137 | public function directory() |
||
144 | |||
145 | /** |
||
146 | * @deprecated This function is not being used internally anymore and will be removed in the next major version. |
||
147 | * |
||
148 | * @param int|null $index |
||
149 | * |
||
150 | * @return array|null|string |
||
151 | */ |
||
152 | public function segments(int $index = null) |
||
167 | |||
168 | /** |
||
169 | * @param int $index |
||
170 | * |
||
171 | * @return string|null |
||
172 | */ |
||
173 | public function segment(int $index) |
||
181 | |||
182 | public function isEqual(Url $otherUrl): bool |
||
186 | |||
187 | /** |
||
188 | * @return string |
||
189 | */ |
||
190 | public function __toString() |
||
204 | |||
205 | /** |
||
206 | * @param string|null $haystack |
||
207 | * @param string|array $needles |
||
208 | * |
||
209 | * @return bool |
||
210 | */ |
||
211 | public function startsWith($haystack, $needles): bool |
||
221 | } |
||
222 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.