PHP Интерфейс Icicle\Http\Message\Uri

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
__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