Class Uri (namespace Nette\Web)
URI Syntax (RFC 3986).
http://user:password@nettephp.com:8042/en/manual.html?name=param#fragment \__/^^^\_____________________________/\_____________/^\________/^\______/ | | | | | scheme authority path query fragment
- authority: [user[:password]@]host[:port]
- hostUri: http://user:password@nettephp.com:8042
Object | --FreezableObject | --Uri
Direct Known Sub-classes:
Public Method Summary | |
---|---|
Uri |
__construct
([string $uri =
NULL ])
|
void |
appendQuery
(string|array $value)
Appends the query part of URI.
|
void |
canonicalize
()
Transform to canonical form.
|
string |
Returns the entire URI including query string and fragment.
|
string |
getAuthority
()
Returns the [user[:pass]@]host[:port] part of URI.
|
string |
getFragment
()
Returns the fragment part of URI.
|
string |
getHost
()
Returns the host part of URI.
|
string |
getHostUri
()
Returns the scheme and authority part of URI.
|
void |
getPass
()
|
string |
getPassword
()
Returns the password part of URI.
|
string |
getPath
()
Returns the path part of URI.
|
string |
getPort
()
Returns the port part of URI.
|
string |
getQuery
()
Returns the query part of URI.
|
string |
getScheme
()
Returns the scheme part of URI.
|
string |
getUser
()
Returns the user name part of URI.
|
bool |
isEqual
(string $uri)
URI comparsion (this object must be in canonical form).
|
Uri |
setFragment
(string $value)
Sets the fragment part of URI.
|
Uri |
setHost
(string $value)
Sets the host part of URI.
|
void |
setPass
($value)
|
Uri |
setPassword
(string $value)
Sets the password part of URI.
|
Uri |
setPath
(string $value)
Sets the path part of URI.
|
Uri |
setPort
(string $value)
Sets the port part of URI.
|
Uri |
setQuery
(string|array $value)
Sets the query part of URI.
|
Uri |
setScheme
(string $value)
Sets the scheme part of URI.
|
Uri |
setUser
(string $value)
Sets the user name part of URI.
|
static string |
unescape
(string $s, [string $reserved =
'%;/?:@&=+$,' ])
Similar to rawurldecode, but preserve reserved chars encoded.
|
string |
__toString
()
|
Methods Inherited From FreezableObject |
---|
freeze(), isFrozen(), updating(), __clone() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
static array | $defaultPorts | array(
'http' => 80,
'https' => 443,
'ftp' => 21,
'news' => 119,... |
line 58 |
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 96 __constructpublic Uri __construct ([string $uri =
|
||||||||||||||||||
line 310 appendQuerypublic void appendQuery (string|array $value) Appends the query part of URI.
|
||||||||||||||||||
line 434 canonicalizepublic void canonicalize () Transform to canonical form.
|
||||||||||||||||||
line 359 getAbsoluteUripublic string getAbsoluteUri () Returns the entire URI including query string and fragment.
|
||||||||||||||||||
line 372 getAuthoritypublic string getAuthority () Returns the [user[:pass]@]host[:port] part of URI.
|
||||||||||||||||||
line 348 getFragmentpublic string getFragment () Returns the fragment part of URI.
|
||||||||||||||||||
line 234 getHostpublic string getHost () Returns the host part of URI.
|
||||||||||||||||||
line 392 getHostUripublic string getHostUri () Returns the scheme and authority part of URI.
|
||||||||||||||||||
line 209 getPasspublic void getPass ()
|
||||||||||||||||||
line 189 getPasswordpublic string getPassword () Returns the password part of URI.
|
||||||||||||||||||
line 284 getPathpublic string getPath () Returns the path part of URI.
|
||||||||||||||||||
line 259 getPortpublic string getPort () Returns the port part of URI.
|
||||||||||||||||||
line 323 getQuerypublic string getQuery () Returns the query part of URI.
|
||||||||||||||||||
line 139 getSchemepublic string getScheme () Returns the scheme part of URI.
|
||||||||||||||||||
line 164 getUserpublic string getUser () Returns the user name part of URI.
|
||||||||||||||||||
line 404 isEqualpublic bool isEqual (string $uri) URI comparsion (this object must be in canonical form).
|
||||||||||||||||||
line 335 setFragmentpublic Uri setFragment (string $value) Sets the fragment part of URI.
|
||||||||||||||||||
line 221 setHostpublic Uri setHost (string $value) Sets the host part of URI.
|
||||||||||||||||||
line 199 setPasspublic void setPass ($value)
|
||||||||||||||||||
line 176 setPasswordpublic Uri setPassword (string $value) Sets the password part of URI.
|
||||||||||||||||||
line 271 setPathpublic Uri setPath (string $value) Sets the path part of URI.
|
||||||||||||||||||
line 246 setPortpublic Uri setPort (string $value) Sets the port part of URI.
|
||||||||||||||||||
line 296 setQuerypublic Uri setQuery (string|array $value) Sets the query part of URI.
|
||||||||||||||||||
line 126 setSchemepublic Uri setScheme (string $value) Sets the scheme part of URI.
|
||||||||||||||||||
line 151 setUserpublic Uri setUser (string $value) Sets the user name part of URI.
|
||||||||||||||||||
line 466 unescapepublic static string unescape (string $s, [string $reserved = Similar to rawurldecode, but preserve reserved chars encoded.
|
||||||||||||||||||
line 453 __toStringpublic string __toString ()
|