PHP 클래스 Ergo\Http\Url

또한 보기: http://github.com/pda/phool
저자: Paul Annesley ([email protected])
파일 보기 프로젝트 열기: 99designs/ergo 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $urlString )
__toString ( ) : string The URL as a string.
construct ( $urlString )
getDefaultPort ( ) : integer The default TCP port for the scheme of the URL
getFragmentString ( ) : string Fragment string (after fragment delimiter '#')
getHost ( ) : string Hostname (without port information) e.g. example.org
getHostRelativeUrl ( ) : string The URL components after the host.
getHostWithPort ( ) : string Host, including port unless it is the default port for the scheme.
getPath ( ) : string Path component (after host, before query string delimiter '?')
getPort ( ) : integer TCP port number, defaults to 80 for HTTP and 443 for HTTPS.
getQueryString ( ) : string Query string (after query delimiter '?', before fragment delimiter '#')
getScheme ( ) : string Scheme, either http or https
getSchemeRelativeUrl ( ) : string The URL components after the scheme
getUrlForFragment ( $fragment ) : Url Builds a url with a different fragment (the part after # in the url)
getUrlForHost ( $host ) : Url Builds a URL with a different host
getUrlForMergedParameters ( array $queryParameters ) Builds a URL with added/merged query parameters
getUrlForParameters ( array $queryParameters )
getUrlForPath ( $path ) : Url Builds a URL with a different path component
getUrlForRelativePath ( $path ) : Url Builds a URL with a path component that is relative to the current one
getUrlForScheme ( $scheme ) : Url Builds a URL with a different scheme
hasDefaultPort ( ) Whether the URL has a default port (i.e. has a scheme)
hasFragmentString ( ) : boolean Whether the URL has a fragment string.
hasHost ( ) : boolean Whether the URL has a host component.
hasPort ( ) Whether the URL has an explicitly specified port.
hasQueryString ( ) : boolean Whether the URL has a query string.
hasScheme ( ) : boolean Whether the URL has a scheme component.
isPortDefault ( ) : boolean Whether the port is the default for the scheme.
relative ( $path )

비공개 메소드들

메소드 설명
_joinPathComponents ( $path ) Join path/querystring/fragment components together

메소드 상세

__construct() 공개 메소드

public __construct ( string $urlString )
$urlString string

__toString() 공개 메소드

The URL as a string.
public __toString ( ) : string
리턴 string

construct() 공개 정적인 메소드

public static construct ( $urlString )

getDefaultPort() 공개 메소드

The default TCP port for the scheme of the URL
public getDefaultPort ( ) : integer
리턴 integer or null

getFragmentString() 공개 메소드

Fragment string (after fragment delimiter '#')
public getFragmentString ( ) : string
리턴 string

getHost() 공개 메소드

Hostname (without port information) e.g. example.org
public getHost ( ) : string
리턴 string

getHostRelativeUrl() 공개 메소드

The URL components after the host.
public getHostRelativeUrl ( ) : string
리턴 string

getHostWithPort() 공개 메소드

Host, including port unless it is the default port for the scheme.
public getHostWithPort ( ) : string
리턴 string

getPath() 공개 메소드

Path component (after host, before query string delimiter '?')
public getPath ( ) : string
리턴 string

getPort() 공개 메소드

TCP port number, defaults to 80 for HTTP and 443 for HTTPS.
public getPort ( ) : integer
리턴 integer

getQueryString() 공개 메소드

Query string (after query delimiter '?', before fragment delimiter '#')
public getQueryString ( ) : string
리턴 string

getScheme() 공개 메소드

Scheme, either http or https
public getScheme ( ) : string
리턴 string

getSchemeRelativeUrl() 공개 메소드

The URL components after the scheme
public getSchemeRelativeUrl ( ) : string
리턴 string

getUrlForFragment() 공개 메소드

Builds a url with a different fragment (the part after # in the url)
public getUrlForFragment ( $fragment ) : Url
리턴 Url

getUrlForHost() 공개 메소드

Builds a URL with a different host
public getUrlForHost ( $host ) : Url
리턴 Url

getUrlForMergedParameters() 공개 메소드

Builds a URL with added/merged query parameters
public getUrlForMergedParameters ( array $queryParameters )
$queryParameters array

getUrlForParameters() 공개 메소드

public getUrlForParameters ( array $queryParameters )
$queryParameters array

getUrlForPath() 공개 메소드

Builds a URL with a different path component
public getUrlForPath ( $path ) : Url
리턴 Url

getUrlForRelativePath() 공개 메소드

Builds a URL with a path component that is relative to the current one
public getUrlForRelativePath ( $path ) : Url
리턴 Url

getUrlForScheme() 공개 메소드

Builds a URL with a different scheme
public getUrlForScheme ( $scheme ) : Url
리턴 Url

hasDefaultPort() 공개 메소드

Whether the URL has a default port (i.e. has a scheme)
public hasDefaultPort ( )

hasFragmentString() 공개 메소드

Whether the URL has a fragment string.
public hasFragmentString ( ) : boolean
리턴 boolean

hasHost() 공개 메소드

Whether the URL has a host component.
public hasHost ( ) : boolean
리턴 boolean

hasPort() 공개 메소드

Whether the URL has an explicitly specified port.
public hasPort ( )

hasQueryString() 공개 메소드

Whether the URL has a query string.
public hasQueryString ( ) : boolean
리턴 boolean

hasScheme() 공개 메소드

Whether the URL has a scheme component.
public hasScheme ( ) : boolean
리턴 boolean

isPortDefault() 공개 메소드

Whether the port is the default for the scheme.
public isPortDefault ( ) : boolean
리턴 boolean

relative() 공개 메소드

public relative ( $path )