final |
|---|
A collection of headers.
| Methods | ||
|---|---|---|
public
|
__construct(HeaderInterface ...$headers)
|
# |
public
|
__clone()
|
# |
public
|
setMaxLineLength(int $lineLength): void
|
# |
public
|
getMaxLineLength(): int
|
# |
public
|
addMailboxListHeader(string $name, array<Address|string> $addresses): $this
|
# |
public
|
addMailboxHeader(string $name, Address|string $address): $this
|
# |
public
|
addIdHeader(string $name, string|array $ids): $this
|
# |
public
|
addPathHeader(string $name, Address|string $path): $this
|
# |
public
|
addDateHeader(string $name, DateTimeInterface $dateTime): $this
|
# |
public
|
addTextHeader(string $name, string $value): $this
|
# |
public
|
addParameterizedHeader(string $name, string $value, array $params = []): $this
|
# |
public
|
addHeader(string $name, mixed $argument, array $more = []): $this
|
# |
public
|
has(string $name): bool
|
# |
public
|
add(HeaderInterface $header): $this
|
# |
public
|
get(string $name): ?HeaderInterface
|
# |
public
|
all(string $name = null): iterable
|
# |
public
|
getNames(): array
|
# |
public
|
remove(string $name): void
|
# |
public
static
|
isUniqueHeader(string $name): bool
|
# |
public
static
|
checkHeaderClass(HeaderInterface $header): void
|
# |
public
|
toString(): string
|
# |
public
|
toArray(): array
|
# |
public
|
getHeaderBody(string $name): mixed
|
# |
public
|
getHeaderParameter(string $name, string $parameter): ?string
|
# |
| Constants | ||
|---|---|---|
private
|
UNIQUE_HEADERS = [
'date',
'from',
'sender',
'reply-to',
'to',
'cc',
'bcc',
'message-id',
'in-reply-to',
'references',
'subject',
]
|
# |
private
|
HEADER_CLASS_MAP = [
'date' => DateHeader::class,
'from' => MailboxListHeader::class,
'sender' => MailboxHeader::class,
'reply-to' => MailboxListHeader::class,
'to' => MailboxListHeader::class,
'cc' => MailboxListHeader::class,
'bcc' => MailboxListHeader::class,
'message-id' => IdentificationHeader::class,
'in-reply-to' => [UnstructuredHeader::class, IdentificationHeader::class],
'references' => [UnstructuredHeader::class, IdentificationHeader::class],
'return-path' => PathHeader::class,
]
|
# |
| Properties | |||
|---|---|---|---|
private
|
HeaderInterface[][]
|
$headers = []
|
# |
private
|
int
|
$lineLength = 76
|
# |