Attachment
class Attachment implements Arrayable, JsonSerializable (View source)
Methods
Constructor.
Get the attachment's filename.
Get the attachment's content ID.
Get the attachment's content type.
Get the attachment's content disposition.
Get the attachment's contents.
Get the attachment's content stream.
Save the attachment to a file.
Get the attachment's extension.
Get the array representation of the attachment.
Get the JSON representation of the attachment.
Details
__construct(string|null $filename, string|null $contentId, string $contentType, string|null $contentDisposition, StreamInterface $contentStream)
Constructor.
string|null
filename()
Get the attachment's filename.
string|null
contentId()
Get the attachment's content ID.
string
contentType()
Get the attachment's content type.
string
contentDisposition()
Get the attachment's content disposition.
string
contents()
Get the attachment's contents.
StreamInterface
contentStream()
Get the attachment's content stream.
false|int
save(string $path)
Save the attachment to a file.
string|null
extension()
Get the attachment's extension.
array
toArray()
Get the array representation of the attachment.
array
jsonSerialize()
Get the JSON representation of the attachment.