src/Viserio/Component/Mail/TransportFactory.php
public function getTransport(string $transport, array $config): Swift_Transport
    {
        // If the given transport has not been created before, we will create the instances
        // here and cache it so we can return it next time very quickly. If there is
        // already a transport created by this name, we'll just return that instance.
        if (! isset($this->transports[$transport])) {
            $this->transports[$transport] = $this->createTransport($transport, $config);
        }

        return $this->transports[$transport];
    }
public function getTransport(string $transport, array $config): Swift_Transport
    {
        // If the given transport has not been created before, we will create the instances
        // here and cache it so we can return it next time very quickly. If there is
        // already a transport created by this name, we'll just return that instance.
        if (! isset($this->transports[$transport])) {
            $this->transports[$transport] = $this->createTransport($transport, $config);
        }

        return $this->transports[$transport];
    }
Get a transport instance.

@param string $transport
@param array  $config

@throws \Viserio\Component\Contract\Mail\Exception\InvalidArgumentException

@return \Swift_Transport