Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Transport.php

function Transport::fromString

1 call to Transport::fromString()
Transport::fromStrings in vendor/symfony/mailer/Transport.php

File

vendor/symfony/mailer/Transport.php, line 107

Class

Transport
@author Fabien Potencier <fabien@symfony.com> @author Konstantin Myakshin <molodchick@gmail.com>

Namespace

Symfony\Component\Mailer

Code

public function fromString(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;
}
RSS feed
Powered by Drupal