Class AbstractMessage

Summary

Fully Qualified Name: Zend\Http\AbstractMessage
Extends: Message

Description

HTTP standard message (Request/Response)

Methods

Name Description Defined By
__toString() Allow PHP casting of this object AbstractMessage
getContent() Get message content Message
getHeaders() Return the header container responsible for headers AbstractMessage
getMetadata() Retrieve all metadata or a single metadatum as specified by key Message
getVersion() Return the HTTP version for this request AbstractMessage
setContent() Set message content Message
setHeaders() Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders()) AbstractMessage
setMetadata() Set message metadata Message
setVersion() Set the HTTP version for this object, one of 1.0, 1.1 or 2 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2) AbstractMessage
toString() Message

Method Details

__toString()

Allow PHP casting of this object

Returns: string

getContent()

Get message content

Returns: mixed

getHeaders()

Return the header container responsible for headers

Returns: \Headers

getMetadata()

Retrieve all metadata or a single metadatum as specified by key

Parameter Name Type Description
$key null|string|int
$default null|mixed

Returns: mixed

getVersion()

Return the HTTP version for this request

Returns: string

setContent()

Set message content

Parameter Name Type Description
$value mixed

Returns: \Message

setHeaders()

Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders())

Parameter Name Type Description
$headers \Headers

Returns: \AbstractMessage

setMetadata()

Set message metadata

Non-destructive setting of message metadata; always adds to the metadata, never overwrites the entire metadata container.

Parameter Name Type Description
$spec string|int|array|\Traversable
$value mixed

Returns: \Message

setVersion()

Set the HTTP version for this object, one of 1.0, 1.1 or 2 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2)

Parameter Name Type Description
$version string (Must

Returns: \AbstractMessage

toString()

Returns: string

Top