final class SmsmodeTransportFactory extends AbstractTransportFactory
{ private const TRANSPORT_SCHEME = 'smsmode';
public function create(Dsn
$dsn): SmsmodeTransport
{ $scheme =
$dsn->
getScheme();
if (self::TRANSPORT_SCHEME !==
$scheme) { throw new UnsupportedSchemeException($dsn, self::TRANSPORT_SCHEME,
$this->
getSupportedSchemes());
} $apiKey =
$this->
getUser($dsn);
$from =
$dsn->
getRequiredOption('from'
);
$host = 'default' ===
$dsn->
getHost() ? null :
$dsn->
getHost();
$port =
$dsn->
getPort();
return (new SmsmodeTransport($apiKey,
$from,
$this->client,
$this->dispatcher
))->
setHost($host)->
setPort($port);
} protected function getSupportedSchemes(): array
{