class Headers

Traits

Methods

mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

__construct(string|null $messageId = null, array $references = [], array $text = [])

Create a new instance of headers for a message.

messageId(string $messageId)

Set the message ID.

references(array $references)

Set the message IDs referenced by this message.

text(array $text)

Set the headers for this message.

string
referencesString()

Get the references header as a string.

Details

in Conditionable at line 23
mixed when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

in Conditionable at line 56
mixed unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

at line 22
__construct(string|null $messageId = null, array $references = [], array $text = [])

Create a new instance of headers for a message.

Parameters

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

at line 32
Headers messageId(string $messageId)

Set the message ID.

Parameters

string $messageId

Return Value

Headers

at line 42
Headers references(array $references)

Set the message IDs referenced by this message.

Parameters

array $references

Return Value

Headers

at line 52
Headers text(array $text)

Set the headers for this message.

Parameters

array $text

Return Value

Headers

at line 62
string referencesString()

Get the references header as a string.

Return Value

string