class TextMessage mixin Message

Traits

Methods

mixed
forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

mixed
forwardDecoratedCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object, returning $this if the forwarded call returned itself.

static never
throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

__construct(Message $message)

Create a new text message instance.

string
embed(Attachable|Attachment|string $file)

Embed a file in the message and get the CID.

string
embedData(mixed $data, string $name, string|null $contentType = null)

Embed in-memory data in the message and get the CID.

__call(string $method, array $parameters)

Dynamically pass missing methods to the underlying message instance.

Details

in ForwardsCalls at line 22
protected mixed forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in ForwardsCalls at line 52
protected mixed forwardDecoratedCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object, returning $this if the forwarded call returned itself.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in ForwardsCalls at line 66
static protected never throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

Parameters

string $method

Return Value

never

Exceptions

BadMethodCallException

at line 20
__construct(Message $message)

Create a new text message instance.

Parameters

Message $message

at line 28
string embed(Attachable|Attachment|string $file)

Embed a file in the message and get the CID.

Parameters

Attachable|Attachment|string $file

Return Value

string

at line 36
string embedData(mixed $data, string $name, string|null $contentType = null)

Embed in-memory data in the message and get the CID.

Parameters

mixed $data
string $name
string|null $contentType

Return Value

string

at line 44
__call(string $method, array $parameters)

Dynamically pass missing methods to the underlying message instance.

Parameters

string $method
array $parameters