class Attachment (View source)

An Attachment is a container for a file that will be included with a Message.

Properties

protected string $path
protected string $name
protected string $type
protected string|null $id

Methods

__construct(string $path, string|null $name = null, string|null $type = null, string|null $id = null)

No description

bool
isValidFile(string $path)

No description

string
determineFileType(string $path)

No description

string
getPath()

No description

string
getName()

No description

string
getType()

No description

string|null
getId()

No description

Details

__construct(string $path, string|null $name = null, string|null $type = null, string|null $id = null)

Parameters

string $path
string|null $name
string|null $type
string|null $id

Exceptions

InvalidArgumentException
RuntimeException

protected bool isValidFile(string $path)

Parameters

string $path

Return Value

bool

protected string determineFileType(string $path)

Parameters

string $path

Return Value

string

Exceptions

RuntimeException

string getPath()

Return Value

string

string getName()

Return Value

string

string getType()

Return Value

string

string|null getId()

Return Value

string|null