Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Message Class Reference

Public Member Functions

 setMetadata ($spec, $value=null)
 Set message metadata.
 
 getMetadata ($key=null, $default=null)
 Retrieve all metadata or a single metadatum as specified by key.
 
 setContent ($value)
 Set message content.
 
 getContent ()
 Get message content.
 
 toString ()
 
- Public Member Functions inherited from MessageInterface
 getMetadata ($key=null)
 Get metadata.
 

Protected Attributes

 $metadata = []
 
 $content = ''
 

Member Function Documentation

getContent ( )

Get message content.

Returns
mixed

Implements MessageInterface.

getMetadata (   $key = null,
  $default = null 
)

Retrieve all metadata or a single metadatum as specified by key.

Parameters
null | string | int$key
null | mixed$default
Exceptions
Exception\InvalidArgumentException
Returns
mixed
setContent (   $value)

Set message content.

Parameters
mixed$value
Returns
Message

Implements MessageInterface.

setMetadata (   $spec,
  $value = null 
)

Set message metadata.

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

Parameters
string | int | array | Traversable$spec
mixed$value
Exceptions
Exception\InvalidArgumentException
Returns
Message

Implements MessageInterface.

toString ( )
Returns
string

Member Data Documentation

$content = ''
protected
$metadata = []
protected