PHP 클래스 Nette\Http\Url

scheme  user  password  host  port  basePath   relativeUrl
  |      |      |        |      |    |             |
--\   /--\ /------\ /-------\ /--\/--\/----------------------------\
http://john:[email protected]:8042/en/manual.php?name=param#fragment  <-- absoluteUrl
       \__________________________/\____________/^\________/^\______/
                    |                     |           |         |
                authority               path        query    fragment
- authority: [user[:password]@]host[:port] - hostUrl: http://user:[email protected]:8042 - basePath: /en/ (everything before relative URI not including the script name) - baseUrl: http://user:[email protected]:8042/en/ - relativeUrl: manual.php
저자: David Grudl
상속: extends Nette\FreezableObject
파일 보기 프로젝트 열기: nette/http 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultPorts array

공개 메소드들

메소드 설명
__construct ( $url = NULL )
__toString ( ) : string
appendQuery ( $value ) : self Appends the query part of URI.
canonicalize ( ) : self Transforms URL to canonical form.
getAbsoluteUrl ( ) : string Returns the entire URI including query string and fragment.
getAuthority ( ) : string Returns the [user[:pass]@]host[:port] part of URI.
getBasePath ( ) : string Returns the base-path.
getBaseUrl ( ) : string Returns the base-URI.
getFragment ( ) : string Returns the fragment part of URI.
getHost ( ) : string Returns the host part of URI.
getHostUrl ( ) : string Returns the scheme and authority part of URI.
getPassword ( ) : string Returns the password part of URI.
getPath ( ) : string Returns the path part of URI.
getPort ( ) : integer | null Returns the port part of URI.
getQuery ( ) : string Returns the query part of URI.
getQueryParameter ( $name, $default = NULL ) : mixed
getQueryParameters ( ) : array
getRelativeUrl ( ) : string Returns the relative-URI.
getScheme ( ) : string Returns the scheme part of URI.
getUser ( ) : string Returns the user name part of URI.
isEqual ( $url ) : boolean URL comparison.
jsonSerialize ( ) : string
parseQuery ( $s ) : array Parses query string.
setFragment ( $value ) : self Sets the fragment part of URI.
setHost ( $value ) : self Sets the host part of URI.
setPassword ( $value ) : self Sets the password part of URI.
setPath ( $value ) : self Sets the path part of URI.
setPort ( $value ) : self Sets the port part of URI.
setQuery ( $value ) : self Sets the query part of URI.
setQueryParameter ( $name, $value ) : self
setScheme ( $value ) : self Sets the scheme part of URI.
setUser ( $value ) : self Sets the user name part of URI.
unescape ( $s, $reserved = '%;/?:@&=+$,' ) : string Similar to rawurldecode, but preserves reserved chars encoded.

메소드 상세

__construct() 공개 메소드

public __construct ( $url = NULL )

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

appendQuery() 공개 메소드

Appends the query part of URI.
public appendQuery ( $value ) : self
리턴 self

canonicalize() 공개 메소드

Transforms URL to canonical form.
public canonicalize ( ) : self
리턴 self

getAbsoluteUrl() 공개 메소드

Returns the entire URI including query string and fragment.
public getAbsoluteUrl ( ) : string
리턴 string

getAuthority() 공개 메소드

Returns the [user[:pass]@]host[:port] part of URI.
public getAuthority ( ) : string
리턴 string

getBasePath() 공개 메소드

Returns the base-path.
public getBasePath ( ) : string
리턴 string

getBaseUrl() 공개 메소드

Returns the base-URI.
public getBaseUrl ( ) : string
리턴 string

getFragment() 공개 메소드

Returns the fragment part of URI.
public getFragment ( ) : string
리턴 string

getHost() 공개 메소드

Returns the host part of URI.
public getHost ( ) : string
리턴 string

getHostUrl() 공개 메소드

Returns the scheme and authority part of URI.
public getHostUrl ( ) : string
리턴 string

getPassword() 공개 메소드

Returns the password part of URI.
public getPassword ( ) : string
리턴 string

getPath() 공개 메소드

Returns the path part of URI.
public getPath ( ) : string
리턴 string

getPort() 공개 메소드

Returns the port part of URI.
public getPort ( ) : integer | null
리턴 integer | null

getQuery() 공개 메소드

Returns the query part of URI.
public getQuery ( ) : string
리턴 string

getQueryParameter() 공개 메소드

public getQueryParameter ( $name, $default = NULL ) : mixed
리턴 mixed

getQueryParameters() 공개 메소드

public getQueryParameters ( ) : array
리턴 array

getRelativeUrl() 공개 메소드

Returns the relative-URI.
public getRelativeUrl ( ) : string
리턴 string

getScheme() 공개 메소드

Returns the scheme part of URI.
public getScheme ( ) : string
리턴 string

getUser() 공개 메소드

Returns the user name part of URI.
public getUser ( ) : string
리턴 string

isEqual() 공개 메소드

URL comparison.
public isEqual ( $url ) : boolean
리턴 boolean

jsonSerialize() 공개 메소드

public jsonSerialize ( ) : string
리턴 string

parseQuery() 공개 정적인 메소드

Parses query string.
public static parseQuery ( $s ) : array
리턴 array

setFragment() 공개 메소드

Sets the fragment part of URI.
public setFragment ( $value ) : self
리턴 self

setHost() 공개 메소드

Sets the host part of URI.
public setHost ( $value ) : self
리턴 self

setPassword() 공개 메소드

Sets the password part of URI.
public setPassword ( $value ) : self
리턴 self

setPath() 공개 메소드

Sets the path part of URI.
public setPath ( $value ) : self
리턴 self

setPort() 공개 메소드

Sets the port part of URI.
public setPort ( $value ) : self
리턴 self

setQuery() 공개 메소드

Sets the query part of URI.
public setQuery ( $value ) : self
리턴 self

setQueryParameter() 공개 메소드

public setQueryParameter ( $name, $value ) : self
리턴 self

setScheme() 공개 메소드

Sets the scheme part of URI.
public setScheme ( $value ) : self
리턴 self

setUser() 공개 메소드

Sets the user name part of URI.
public setUser ( $value ) : self
리턴 self

unescape() 공개 정적인 메소드

Similar to rawurldecode, but preserves reserved chars encoded.
public static unescape ( $s, $reserved = '%;/?:@&=+$,' ) : string
리턴 string

프로퍼티 상세

$defaultPorts 공개적으로 정적으로 프로퍼티

public static array $defaultPorts
리턴 array