Abstract Location Header Supports headers that have URI as value

see
see
see Note for 'Location' header: While RFC 1945 requires an absolute URI, most of the browsers also support relative URI This class allows relative URIs, and let user retrieve URI instance if strict validation needed
package Default

 Methods

Allow casting to string

__toString() : string

Returns

string

Create location-based header from string

fromString(string $headerLine) : \Zend\Http\Header\AbstractLocation
Static
inherited_from \Zend\Http\Header\HeaderInterface::fromString()

Parameters

$headerLine

string

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

\Zend\Http\Header\AbstractLocation

Get header value as URI string

getFieldValue() : string
inherited_from \Zend\Http\Header\HeaderInterface::getFieldValue()

Returns

string

Return the URI for this header

getUri() : string

Returns

string

Set the URI/URL for this header, this can be a string or an instance of Zend\Uri\Http

setUri(string|\Zend\Uri\UriInterface $uri) : \Zend\Http\Header\AbstractLocation

Parameters

$uri

string\Zend\Uri\UriInterface

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

\Zend\Http\Header\AbstractLocation

Output header line

toString() : string

Returns in form of "NAME: VALUE"

inherited_from \Zend\Http\Header\HeaderInterface::toString()

Returns

string

Return the URI for this header as an instance of Zend\Uri\Http

uri() : \Zend\Uri\UriInterface

Returns

\Zend\Uri\UriInterface

 Properties

 

URI for this header

$uri : \Zend\Uri\UriInterface

Default

null