HumHub Documentation (unofficial)

Response extends Message
in package
implements ResponseInterface

Table of Contents

Interfaces

ResponseInterface

Properties

$content  : mixed
$metadata  : array<string|int, mixed>

Methods

getContent()  : mixed
Get message content
getMetadata()  : mixed
Retrieve all metadata or a single metadatum as specified by key
setContent()  : Message
Set message content
setMetadata()  : Message
Set message metadata
toString()  : string

Properties

$content

protected mixed $content = ''

$metadata

protected array<string|int, mixed> $metadata = []

Methods

getContent()

Get message content

public getContent() : mixed

getMetadata()

Retrieve all metadata or a single metadatum as specified by key

public getMetadata([null|string|int $key = null ][, null|mixed $default = null ]) : mixed
Parameters
$key : null|string|int = null
$default : null|mixed = null
Tags
throws
InvalidArgumentException

setContent()

Set message content

public setContent(mixed $value) : Message
Parameters
$value : mixed
Return values
Message

setMetadata()

Set message metadata

public setMetadata(string|int|array<string|int, mixed>|Traversable $spec[, mixed $value = null ]) : Message

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

Parameters
$spec : string|int|array<string|int, mixed>|Traversable
$value : mixed = null
Tags
throws
InvalidArgumentException
Return values
Message

toString()

public toString() : string
Return values
string

        
On this page

Search results