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).
|
void |
setFragment
(string $value)
Sets the fragment part of URI.
|
void |
setHost
(string $value)
Sets the host part of URI.
|
void |
setPass
($value)
|
void |
setPassword
(string $value)
Sets the password part of URI.
|
void |
setPath
(string $value)
Sets the path part of URI.
|
void |
setPort
(string $value)
Sets the port part of URI.
|
void |
setQuery
(string|array $value)
Sets the query part of URI.
|
void |
setScheme
(string $value)
Sets the scheme part of URI.
|
void |
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 304 appendQuerypublic void appendQuery (string|array $value) Appends the query part of URI.
|
||||||||||||||||||
line 427 canonicalizepublic void canonicalize () Transform to canonical form.
|
||||||||||||||||||
line 352 getAbsoluteUripublic string getAbsoluteUri () Returns the entire URI including query string and fragment.
|
||||||||||||||||||
line 365 getAuthoritypublic string getAuthority () Returns the [user[:pass]@]host[:port] part of URI.
|
||||||||||||||||||
line 341 getFragmentpublic string getFragment () Returns the fragment part of URI.
|
||||||||||||||||||
line 230 getHostpublic string getHost () Returns the host part of URI.
|
||||||||||||||||||
line 385 getHostUripublic string getHostUri () Returns the scheme and authority part of URI.
|
||||||||||||||||||
line 206 getPasspublic void getPass ()
|
||||||||||||||||||
line 186 getPasswordpublic string getPassword () Returns the password part of URI.
|
||||||||||||||||||
line 278 getPathpublic string getPath () Returns the path part of URI.
|
||||||||||||||||||
line 254 getPortpublic string getPort () Returns the port part of URI.
|
||||||||||||||||||
line 317 getQuerypublic string getQuery () Returns the query part of URI.
|
||||||||||||||||||
line 138 getSchemepublic string getScheme () Returns the scheme part of URI.
|
||||||||||||||||||
line 162 getUserpublic string getUser () Returns the user name part of URI.
|
||||||||||||||||||
line 397 isEqualpublic bool isEqual (string $uri) URI comparsion (this object must be in canonical form).
|
||||||||||||||||||
line 329 setFragmentpublic void setFragment (string $value) Sets the fragment part of URI.
|
||||||||||||||||||
line 218 setHostpublic void setHost (string $value) Sets the host part of URI.
|
||||||||||||||||||
line 196 setPasspublic void setPass ($value)
|
||||||||||||||||||
line 174 setPasswordpublic void setPassword (string $value) Sets the password part of URI.
|
||||||||||||||||||
line 266 setPathpublic void setPath (string $value) Sets the path part of URI.
|
||||||||||||||||||
line 242 setPortpublic void setPort (string $value) Sets the port part of URI.
|
||||||||||||||||||
line 290 setQuerypublic void setQuery (string|array $value) Sets the query part of URI.
|
||||||||||||||||||
line 126 setSchemepublic void setScheme (string $value) Sets the scheme part of URI.
|
||||||||||||||||||
line 150 setUserpublic void setUser (string $value) Sets the user name part of URI.
|
||||||||||||||||||
line 459 unescapepublic static string unescape (string $s, [string $reserved = Similar to rawurldecode, but preserve reserved chars encoded.
|
||||||||||||||||||
line 446 __toStringpublic string __toString ()
|