PHP 인터페이스 Icicle\Http\Message\Uri

파일 보기 프로젝트 열기: icicleio/http 0 사용 예제들

공개 메소드들

메소드 설명
__toString ( ) : string Returns the URI string representation.
getFragment ( ) : string Returns the fragment portion of the URI (does not include # prefix).
getHost ( ) : string Returns the host or an empty string if no host is set.
getPath ( ) : string Returns the path portion of the URI.
getPort ( ) : integer Returns the port or 0 if no port is set and no scheme is set.
getQueryValue ( string $name ) : string Returns the value of the given query value. If multiple values were present for the named parameter, only the first value will be returned. Use getQueryValueAsArray() to return an array of all values for the particular parameter. Returns an empty string if the named parameter does not exist.
getQueryValueAsArray ( string $name ) : array Returns all values for the given query key name or an empty array if the key name does not exist.
getQueryValues ( ) : array Returns an array of the key/value pairs corresponding to the query portion of the URI.
getScheme ( ) : string Returns the scheme (without : or ://) or an empty string.
hasQueryValue ( string $name ) : boolean Determines if a query key exists for the given name.
withFragment ( string $fragment = null ) : Icicle\Http\Message\Uri Returns a new instance with the given fragment or null to remove fragment. Any # prefix should be trimmed.
withPort ( integer $port = null ) : Icicle\Http\Message\Uri Returns a new instance with the given port or null to remove port.
withQuery ( string $query = null ) : Icicle\Http\Message\Uri Returns a new instance with the given query string or null to remove query string. Any ? prefix should be trimmed.
withQueryValue ( string $name, string $value ) : Icicle\Http\Message\Uri Returns a new instance with the given name and value pair in the query string (i.e., $name=$value)
withScheme ( string $scheme = null ) : Icicle\Http\Message\Uri Returns a new instance with the given scheme or no scheme if null. :// or : suffix should be trimmed.
withUser ( string $user, string $password = null ) : Icicle\Http\Message\Uri Returns a new instance with the given user and password. Use null for $user to remove user info.
withoutQueryValue ( string $name ) : Icicle\Http\Message\Uri Returns a new instance with the given key name removed from the query string.

메소드 상세

__toString() 공개 메소드

Returns the URI string representation.
public __toString ( ) : string
리턴 string

getFragment() 공개 메소드

Returns the fragment portion of the URI (does not include # prefix).
public getFragment ( ) : string
리턴 string

getHost() 공개 메소드

Returns the host or an empty string if no host is set.
public getHost ( ) : string
리턴 string

getPath() 공개 메소드

Returns the path portion of the URI.
public getPath ( ) : string
리턴 string Path including / prefix unless path is empty, then an empty string is returned.

getPort() 공개 메소드

Returns the port or 0 if no port is set and no scheme is set.
public getPort ( ) : integer
리턴 integer

getQueryValue() 공개 메소드

Returns the value of the given query value. If multiple values were present for the named parameter, only the first value will be returned. Use getQueryValueAsArray() to return an array of all values for the particular parameter. Returns an empty string if the named parameter does not exist.
public getQueryValue ( string $name ) : string
$name string
리턴 string

getQueryValueAsArray() 공개 메소드

Returns all values for the given query key name or an empty array if the key name does not exist.
public getQueryValueAsArray ( string $name ) : array
$name string
리턴 array

getQueryValues() 공개 메소드

Returns an array of the key/value pairs corresponding to the query portion of the URI.
public getQueryValues ( ) : array
리턴 array

getScheme() 공개 메소드

Returns the scheme (without : or ://) or an empty string.
public getScheme ( ) : string
리턴 string

hasQueryValue() 공개 메소드

Determines if a query key exists for the given name.
public hasQueryValue ( string $name ) : boolean
$name string
리턴 boolean

withFragment() 공개 메소드

Returns a new instance with the given fragment or null to remove fragment. Any # prefix should be trimmed.
public withFragment ( string $fragment = null ) : Icicle\Http\Message\Uri
$fragment string
리턴 Icicle\Http\Message\Uri

withPort() 공개 메소드

Returns a new instance with the given port or null to remove port.
public withPort ( integer $port = null ) : Icicle\Http\Message\Uri
$port integer
리턴 Icicle\Http\Message\Uri

withQuery() 공개 메소드

Returns a new instance with the given query string or null to remove query string. Any ? prefix should be trimmed.
public withQuery ( string $query = null ) : Icicle\Http\Message\Uri
$query string
리턴 Icicle\Http\Message\Uri

withQueryValue() 공개 메소드

Returns a new instance with the given name and value pair in the query string (i.e., $name=$value)
public withQueryValue ( string $name, string $value ) : Icicle\Http\Message\Uri
$name string
$value string
리턴 Icicle\Http\Message\Uri

withScheme() 공개 메소드

Returns a new instance with the given scheme or no scheme if null. :// or : suffix should be trimmed.
public withScheme ( string $scheme = null ) : Icicle\Http\Message\Uri
$scheme string
리턴 Icicle\Http\Message\Uri

withUser() 공개 메소드

Returns a new instance with the given user and password. Use null for $user to remove user info.
public withUser ( string $user, string $password = null ) : Icicle\Http\Message\Uri
$user string
$password string
리턴 Icicle\Http\Message\Uri

withoutQueryValue() 공개 메소드

Returns a new instance with the given key name removed from the query string.
public withoutQueryValue ( string $name ) : Icicle\Http\Message\Uri
$name string
리턴 Icicle\Http\Message\Uri