Skip to content

Instantly share code, notes, and snippets.

@ismail1432
Last active August 7, 2021 23:49
Show Gist options
  • Save ismail1432/6b5b825617bad4e8f73d1858d766749b to your computer and use it in GitHub Desktop.
Save ismail1432/6b5b825617bad4e8f73d1858d766749b to your computer and use it in GitHub Desktop.
<?php
namespace App\UserlandTransport;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;
use Symfony\Component\Notifier\Transport\TransportInterface;
class UserlandTransportFactory extends AbstractTransportFactory
{
protected function getSupportedSchemes(): array
{
return ['userland'];
}
/**
* In our example, we don't have to pass credentials
* check https://github.com/symfony/linked-in-notifier/blob/5.3/LinkedInTransportFactory.php#L24
* if you need to parse the DSN.
*/
public function create(Dsn $dsn): TransportInterface
{
return new UserlandTransport();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment