2021-04-18 22:24:02 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace DigiComp\FlowSymfonyBridge\Messenger\Transport;
|
|
|
|
|
|
|
|
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
|
|
|
|
use Symfony\Component\Messenger\Transport\TransportFactoryInterface;
|
|
|
|
use Symfony\Component\Messenger\Transport\TransportInterface;
|
|
|
|
|
|
|
|
class NullTransportFactory implements TransportFactoryInterface
|
|
|
|
{
|
|
|
|
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
|
|
|
|
{
|
|
|
|
return new NullTransport();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function supports(string $dsn, array $options): bool
|
|
|
|
{
|
2023-02-18 22:53:05 +01:00
|
|
|
return \str_starts_with($dsn, 'null://');
|
2021-04-18 22:24:02 +02:00
|
|
|
}
|
|
|
|
}
|