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 46 |
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 84 __constructpublic Uri __construct ([string $uri =
|
||||||||||||||||||
line 300 appendQuerypublic void appendQuery (string|array $value) Appends the query part of URI.
|
||||||||||||||||||
line 419 canonicalizepublic void canonicalize () Transform to canonical form.
|
||||||||||||||||||
line 349 getAbsoluteUripublic string getAbsoluteUri () Returns the entire URI including query string and fragment.
|
||||||||||||||||||
line 362 getAuthoritypublic string getAuthority () Returns the [user[:pass]@]host[:port] part of URI.
|
||||||||||||||||||
line 338 getFragmentpublic string getFragment () Returns the fragment part of URI.
|
||||||||||||||||||
line 224 getHostpublic string getHost () Returns the host part of URI.
|
||||||||||||||||||
line 382 getHostUripublic string getHostUri () Returns the scheme and authority part of URI.
|
||||||||||||||||||
line 198 getPasspublic void getPass ()
|
||||||||||||||||||
line 177 getPasswordpublic string getPassword () Returns the password part of URI.
|
||||||||||||||||||
line 274 getPathpublic string getPath () Returns the path part of URI.
|
||||||||||||||||||
line 249 getPortpublic string getPort () Returns the port part of URI.
|
||||||||||||||||||
line 313 getQuerypublic string getQuery () Returns the query part of URI.
|
||||||||||||||||||
line 127 getSchemepublic string getScheme () Returns the scheme part of URI.
|
||||||||||||||||||
line 152 getUserpublic string getUser () Returns the user name part of URI.
|
||||||||||||||||||
line 394 isEqualpublic bool isEqual (string $uri) URI comparsion (this object must be in canonical form).
|
||||||||||||||||||
line 325 setFragmentpublic Uri setFragment (string $value) Sets the fragment part of URI.
|
||||||||||||||||||
line 211 setHostpublic Uri setHost (string $value) Sets the host part of URI.
|
||||||||||||||||||
line 187 setPasspublic void setPass ($value)
|
||||||||||||||||||
line 164 setPasswordpublic Uri setPassword (string $value) Sets the password part of URI.
|
||||||||||||||||||
line 261 setPathpublic Uri setPath (string $value) Sets the path part of URI.
|
||||||||||||||||||
line 236 setPortpublic Uri setPort (string $value) Sets the port part of URI.
|
||||||||||||||||||
line 286 setQuerypublic Uri setQuery (string|array $value) Sets the query part of URI.
|
||||||||||||||||||
line 114 setSchemepublic Uri setScheme (string $value) Sets the scheme part of URI.
|
||||||||||||||||||
line 139 setUserpublic Uri setUser (string $value) Sets the user name part of URI.
|
||||||||||||||||||
line 445 unescapepublic static string unescape (string $s, [string $reserved = Similar to rawurldecode, but preserve reserved chars encoded.
|
||||||||||||||||||
line 432 __toStringpublic string __toString ()
|