class CanaryTransportFactory
Same name and namespace in other branches
- main core/modules/mailer/tests/modules/mailer_transport_factory_kernel_test/src/Transport/CanaryTransportFactory.php \Drupal\mailer_transport_factory_kernel_test\Transport\CanaryTransportFactory
A transport factory only used to test the transport factory adapter.
Hierarchy
- class \Drupal\mailer_transport_factory_kernel_test\Transport\CanaryTransportFactory implements \Symfony\Component\Mailer\Transport\TransportFactoryInterface extends \Symfony\Component\Mailer\Transport\AbstractTransportFactory
Expanded class hierarchy of CanaryTransportFactory
File
-
core/
modules/ mailer/ tests/ modules/ mailer_transport_factory_kernel_test/ src/ Transport/ CanaryTransportFactory.php, line 16
Namespace
Drupal\mailer_transport_factory_kernel_test\TransportView source
class CanaryTransportFactory extends AbstractTransportFactory implements TransportFactoryInterface {
protected function getSupportedSchemes() : array {
return [
'drupal.test-canary',
];
}
/**
* {@inheritdoc}
*/
public function create(Dsn $dsn) : TransportInterface {
if ($dsn->getScheme() === 'drupal.test-canary') {
return new CanaryTransport($this->dispatcher, $this->logger);
}
throw new UnsupportedSchemeException($dsn, 'test_canary', $this->getSupportedSchemes());
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| CanaryTransportFactory::create | public | function | |
| CanaryTransportFactory::getSupportedSchemes | protected | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.