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\TransportCode
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);
}