PHP Interface Icicle\Http\Message\Request

Inheritance: extends Icicle\Http\Message\Message
Mostra file Open project: icicleio/http Interface Usage Examples

Public Methods

Method Description
getCookie ( string $name ) : Icicle\Http\Message\Cookie\Cookie | null
getCookies ( ) : array
getHeader ( string $name ) : string Same as Message::getHeader(), except if the Host header is request and previously unset, the value will be determined from the URI.
getHeaderAsArray ( string $name ) : array Same as Message::getHeader(), except if the Host header is request and previously unset, the value will be determined from the URI.
getHeaders ( ) : array Same as Message::getHeaders(), except the Host header will always be set based on the URI.
getMethod ( ) : string Returns the request method.
getRequestTarget ( ) : Icicle\Http\Message\Uri Returns the target of the request. Unless explicitly set, this will usually be the path and query portion of the URI.
getUri ( ) : Icicle\Http\Message\Uri Returns the request URI.
hasCookie ( string $name ) : boolean
withCookie ( string $name, string $value ) : Icicle\Http\Message\Request
withMethod ( string $method ) : Icicle\Http\Message\Request Returns a new instance with the given request method.
withRequestTarget ( string $target ) : Icicle\Http\Message\Request Returns a new instance with the given request target.
withUri ( Icicle\Http\Message\Uri $uri ) : Icicle\Http\Message\Request Returns a new instance with the given URI.
withoutCookie ( string $name ) : Icicle\Http\Message\Request

Method Details

getCookie() public method

public getCookie ( string $name ) : Icicle\Http\Message\Cookie\Cookie | null
$name string
return Icicle\Http\Message\Cookie\Cookie | null

getCookies() public method

public getCookies ( ) : array
return array

getHeader() public method

Same as Message::getHeader(), except if the Host header is request and previously unset, the value will be determined from the URI.
public getHeader ( string $name ) : string
$name string
return string

getHeaderAsArray() public method

Same as Message::getHeader(), except if the Host header is request and previously unset, the value will be determined from the URI.
public getHeaderAsArray ( string $name ) : array
$name string
return array

getHeaders() public method

Same as Message::getHeaders(), except the Host header will always be set based on the URI.
public getHeaders ( ) : array
return array

getMethod() public method

Returns the request method.
public getMethod ( ) : string
return string

getRequestTarget() public method

Returns the target of the request. Unless explicitly set, this will usually be the path and query portion of the URI.
public getRequestTarget ( ) : Icicle\Http\Message\Uri
return Icicle\Http\Message\Uri

getUri() public method

Returns the request URI.
public getUri ( ) : Icicle\Http\Message\Uri
return Icicle\Http\Message\Uri

hasCookie() public method

public hasCookie ( string $name ) : boolean
$name string
return boolean

withCookie() public method

public withCookie ( string $name, string $value ) : Icicle\Http\Message\Request
$name string
$value string
return Icicle\Http\Message\Request

withMethod() public method

Returns a new instance with the given request method.
public withMethod ( string $method ) : Icicle\Http\Message\Request
$method string
return Icicle\Http\Message\Request

withRequestTarget() public method

Returns a new instance with the given request target.
public withRequestTarget ( string $target ) : Icicle\Http\Message\Request
$target string
return Icicle\Http\Message\Request

withUri() public method

Returns a new instance with the given URI.
public withUri ( Icicle\Http\Message\Uri $uri ) : Icicle\Http\Message\Request
$uri Icicle\Http\Message\Uri
return Icicle\Http\Message\Request

withoutCookie() public method

public withoutCookie ( string $name ) : Icicle\Http\Message\Request
$name string
return Icicle\Http\Message\Request