Headers
class Headers (View source)
Traits
Properties
string|null | $messageId | The message's message ID. |
|
array | $references | The message IDs that are referenced by the message. |
|
array | $text | The message's text headers. |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a new instance of headers for a message.
Set the message ID.
Set the message IDs referenced by this message.
Set the headers for this message.
Get the references header as a string.
Details
$this|TWhenReturnType
when($value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
$this|TUnlessReturnType
unless($value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
void
__construct(string|null $messageId = null, array $references = [], array $text = [])
Create a new instance of headers for a message.
$this
messageId(string $messageId)
Set the message ID.
$this
references(array $references)
Set the message IDs referenced by this message.
$this
text(array $text)
Set the headers for this message.
string
referencesString()
Get the references header as a string.