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

Breadcrumb

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

function Transports::__construct

Parameters

iterable<string, TransportInterface> $transports:

File

vendor/symfony/mailer/Transport/Transports.php, line 35

Class

Transports
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\Mailer\Transport

Code

public function __construct(iterable $transports) {
    foreach ($transports as $name => $transport) {
        $this->default ??= $transport;
        $this->transports[$name] = $transport;
    }
    if (!$this->transports) {
        throw new LogicException(\sprintf('"%s" must have at least one transport configured.', __CLASS__));
    }
}
RSS feed
Powered by Drupal