{ $transports =
[];
foreach ($dsns as $name =>
$dsn) { $transports[$name] =
$this->
fromString($dsn);
} return new Transports($transports);
} public function fromString(#[\SensitiveParameter] string $dsn): TransportInterface
{ [$transport,
$offset] =
$this->
parseDsn($dsn);
if ($offset !== \
strlen($dsn)) { throw new InvalidArgumentException('The mailer DSN has some garbage at the end.'
);
} return $transport;
} private function parseDsn(#[\SensitiveParameter] string $dsn, int $offset = 0): array
{ static $keywords =
[ 'failover' => FailoverTransport::
class,