MessageInterface
interface MessageInterface
Interface MessageInterface
Methods
Returns a header value.
Returns an array of header lines.
Sets all headers on the current message.
Adds a header to this message.
Adds a set of headers to this message.
Returns the content of the message.
Sets the content of the message.
Returns the message document.
Details
at line 19
string|array|null
getHeader(string $name, string|boolean $glue = "\r\n")
Returns a header value.
at line 26
array
getHeaders()
Returns an array of header lines.
at line 35
setHeaders(array $headers)
Sets all headers on the current message.
Headers can be complete ["Header: value"] pairs or an associative array ["Header" => "value"]
at line 42
addHeader(string $header)
Adds a header to this message.
at line 51
addHeaders(array $headers)
Adds a set of headers to this message.
Headers can be complete ["Header: value"] pairs or an associative array ["Header" => "value"]
at line 58
string
getContent()
Returns the content of the message.
at line 65
setContent(string $content)
Sets the content of the message.
at line 72
string
__toString()
Returns the message document.