Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 840 Bytes

URL

This is helper class for holding information on URL from which you can get various parts. When constructed, it'll parse your URL or Koldy\Url\Exception will be thrown.

You can use this class as method's argument type.

Example:

$url = new \Koldy\Url('https://koldy.net/framework/docs/2.0/url?page=1#hash-value');
method result
$url->getScheme() https
$url->getHost() koldy.net
$url->getPort() Throws exception because port is not set
$url->getUser() Throws exception because user is not set
$url->getPass() Throws exception because pass is not set
$url->getPath() /framework/docs/2.0/url
$url->getQuery() page=1
$url->getFragment() hash-value
$url->getUrl() https://koldy.net/framework/docs/2.0/url?page=1#hash-value
You can’t perform that action at this time.