class TextMessage mixin Message (View source)

Traits

Properties

protected Message $message

The underlying message instance.

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.

void
__construct(Message $message)

Create a new text message instance.

string
embed(string|Attachable|Attachment $file)

Embed a file in the message and get the CID.

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

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

mixed
__call(string $method, array $parameters)

Dynamically pass missing methods to the underlying message instance.

Details

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

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

static protected never throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

Parameters

string $method

Return Value

never

Exceptions

BadMethodCallException

void __construct(Message $message)

Create a new text message instance.

Parameters

Message $message

Return Value

void

string embed(string|Attachable|Attachment $file)

Embed a file in the message and get the CID.

Parameters

string|Attachable|Attachment $file

Return Value

string

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

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

Parameters

string|resource $data
string $name
string|null $contentType

Return Value

string

mixed __call(string $method, array $parameters)

Dynamically pass missing methods to the underlying message instance.

Parameters

string $method
array $parameters

Return Value

mixed