Skip to content

API reference / Quittio \ Core \ Data \ Attachments

Attachment

final readonly class in quittio/core · uses Immutable

Quittio\Core\Data\Attachments\Attachment · Source

Additional supporting document (BG-24).

Properties#

PropertyTypeDescription
$content readonly?string
$description readonly?string
$externalUri readonly?string
$filename readonly?string
$id readonlystring
$mimeType readonly?MimeType

Methods#

MethodDescription
->__construct()
->size()Size of the embedded content (BT-125) in bytes; 0 for an attachment without content, e.g. one with an external URI only.
->with()Returns a copy with the given properties replaced.

__construct()#

public function __construct(
    string $id,
    ?string $description = null,
    ?string $externalUri = null,
    ?string $content = null,
    ?MimeType $mimeType = null,
    ?string $filename = null,
)
ParameterTypeDescription
$idstring
$description?string = null
$externalUri?string = null
$content?string = null
$mimeType?MimeType = null
$filename?string = null

size()#

public function size(): int

Size of the embedded content (BT-125) in bytes; 0 for an attachment without content, e.g. one with an external URI only.

Returns
int

with()#

public function with(array<string, mixed> $changes): static

Returns a copy with the given properties replaced.

ParameterTypeDescription
$changesarray<string, mixed>
Returns
static

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.