class EasyRdf_ParsedUri
A RFC3986 compliant URI parser
Constants
URI_REGEX |
|
Methods
object |
__construct(mixed $uri = null)
Constructor for creating a new parsed URI |
|
boolean |
isAbsolute()
Returns true if this is an absolute (complete) URI |
|
boolean |
isRelative()
Returns true if this is an relative (partial) URI |
|
string |
getScheme()
Returns the scheme of the URI (e.g. |
|
setScheme(string $scheme)
Sets the scheme of the URI (e.g. |
||
string |
getAuthority()
Returns the authority of the URI (e.g. |
|
setAuthority(string $authority)
Sets the authority of the URI (e.g. |
||
string |
getPath()
Returns the path of the URI (e.g. |
|
setPath(string $path)
Set the path of the URI (e.g. |
||
string |
getQuery()
Returns the query string part of the URI (e.g. |
|
setQuery(string $query)
Set the query string of the URI (e.g. |
||
string |
getFragment()
Returns the fragment part of the URI (i.e. |
|
setFragment(string $fragment)
Set the fragment of the URI (i.e. |
||
object |
normalise()
Normalises the path of this URI if it has one. |
|
resolve($relUri)
Resolves a relative URI using this URI as the base URI. |
||
string |
toString()
Convert the parsed URI back into a string |
|
string |
__toString()
Magic method to convert the URI, when casted, back to a string |
Details
at line 69
public object
__construct(mixed $uri = null)
Constructor for creating a new parsed URI
The $uri parameter can either be a string or an associative array with the following keys: scheme, authority, path, query, fragment
at line 100
public boolean
isAbsolute()
Returns true if this is an absolute (complete) URI
at line 108
public boolean
isRelative()
Returns true if this is an relative (partial) URI
at line 116
public string
getScheme()
Returns the scheme of the URI (e.g.
http)
at line 124
public
setScheme(string $scheme)
Sets the scheme of the URI (e.g.
http)
at line 132
public string
getAuthority()
Returns the authority of the URI (e.g.
www.example.com:8080)
at line 140
public
setAuthority(string $authority)
Sets the authority of the URI (e.g.
www.example.com:8080)
at line 148
public string
getPath()
Returns the path of the URI (e.g.
/foo/bar)
at line 156
public
setPath(string $path)
Set the path of the URI (e.g.
/foo/bar)
at line 164
public string
getQuery()
Returns the query string part of the URI (e.g.
foo=bar)
at line 172
public
setQuery(string $query)
Set the query string of the URI (e.g.
foo=bar)
at line 180
public string
getFragment()
Returns the fragment part of the URI (i.e.
after the #)
at line 188
public
setFragment(string $fragment)
Set the fragment of the URI (i.e.
after the #)
at line 202
public object
normalise()
Normalises the path of this URI if it has one.
Normalising a path means that any unnecessary '.' and '..' segments are removed. For example, the URI http://example.com/a/b/../c/./d would be normalised to http://example.com/a/c/d
at line 254
public
resolve($relUri)
Resolves a relative URI using this URI as the base URI.
at line 313
public string
toString()
Convert the parsed URI back into a string
at line 336
public string
__toString()
Magic method to convert the URI, when casted, back to a string