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

Breadcrumb

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

function AbstractHttpTransport::__construct

Overrides AbstractTransport::__construct

File

vendor/symfony/mailer/Transport/AbstractHttpTransport.php, line 30

Class

AbstractHttpTransport
@author Victor Bocharsky <victor@symfonycasts.com>

Namespace

Symfony\Component\Mailer\Transport

Code

public function __construct(?HttpClientInterface $client = null, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null) {
    if (null === $client) {
        if (!class_exists(HttpClient::class)) {
            throw new \LogicException(\sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
        }
        $this->client = HttpClient::create();
    }
    parent::__construct($dispatcher, $logger);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal