DigiComp.FlowSymfonyBridge..../Classes/Transport/NullTransportFactory.php
Ferdinand Kuhl 04ee933830
All checks were successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests Pipeline was successful
Replacing annotations with attributes
2023-02-18 22:53:05 +01:00

20 lines
636 B
PHP

<?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
{
return \str_starts_with($dsn, 'null://');
}
}