Method | Description | |
---|---|---|
getBody ( ) : Icicle\Stream\ReadableStream | Returns the stream for the message body. | |
getHeader ( string $name ) : string | Returns the value of the given header. If multiple headers were present for the named header, only the first header value will be returned. Use getHeaderAsArray() to return an array of all values for the particular header. | |
getHeaderAsArray ( string $name ) : array | Returns the array of values for the given header or an empty array if the header does not exist. | |
getHeaders ( ) : array | Returns the message headers as a string-indexed array of arrays of strings or an empty array if no headers have been set. | |
getProtocolVersion ( ) : string | ||
hasHeader ( string $name ) : boolean | Determines if the message has the given header. | |
withAddedHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message | Returns a new instance with the given value added to the named header. If the header did not exist, the header is created with the given value. | |
withBody ( Icicle\Stream\ReadableStream $stream ) : Icicle\Http\Message\Message | Returns a new instance with the given stream for the message body. | |
withHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message | Returns a new instance with the given header. $value may be a string or an array of strings. | |
withProtocolVersion ( string $version ) : Icicle\Http\Message\Message | Returns a new instance with the given protocol version. | |
withoutHeader ( string $name ) : Icicle\Http\Message\Message | Returns a new instance without the given header. |
public getBody ( ) : Icicle\Stream\ReadableStream | ||
return | Icicle\Stream\ReadableStream |
public getHeaderAsArray ( string $name ) : array | ||
$name | string | |
return | array |
public getHeaders ( ) : array | ||
return | array |
public withAddedHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message | ||
$name | string | |
$value | string | string[] | |
return | Icicle\Http\Message\Message |
public withBody ( Icicle\Stream\ReadableStream $stream ) : Icicle\Http\Message\Message | ||
$stream | Icicle\Stream\ReadableStream | |
return | Icicle\Http\Message\Message |
public withHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message | ||
$name | string | |
$value | string | string[] | |
return | Icicle\Http\Message\Message |
public withProtocolVersion ( string $version ) : Icicle\Http\Message\Message | ||
$version | string | |
return | Icicle\Http\Message\Message |
public withoutHeader ( string $name ) : Icicle\Http\Message\Message | ||
$name | string | |
return | Icicle\Http\Message\Message |