API / Minn\Mail / HostEntry

HostEntry final readonly class

Minn\Mail\HostEntry · public/minn/src/Minn/Mail/HostEntry.php · 36 lines

One entry of a mailer's Host setting ("host", "host:port", "ssl://host:465", "tls://host"; entries are separated by semicolons): the security prefix, the host and the port. Only ssl:// and tls:// are prefixes; anything else stays part of the host and fails the host check.

Constants and properties

propreadonly string $prefix

Promoted from the constructor.

propreadonly string $host

Promoted from the constructor.

propreadonly ?int $port

Promoted from the constructor.

Public

new__construct(string $prefix, string $host, ?int $port)#
staticparseAll(string $hosts): array#

The entries of a Host setting, null where one cannot be read.

@return list<array{0: string, 1: self|null}> the trimmed entry text and its reading
staticvalidHost(mixed $host): bool#

Whether a host name, IPv4 address or bracketed IPv6 address is well formed.