DigiComp.FlowSymfonyBridge..../Classes/Transport/FailureTransportContainer.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

31 lines
697 B
PHP

<?php
namespace DigiComp\FlowSymfonyBridge\Messenger\Transport;
use Neos\Flow\Annotations as Flow;
use Psr\Container\ContainerInterface;
use Symfony\Component\Messenger\Transport\TransportInterface;
#[Flow\Scope('singleton')]
class FailureTransportContainer implements ContainerInterface
{
/**
* @var TransportInterface[]
*/
protected array $transports;
public function get(string $id)
{
return $this->transports[$id];
}
public function has(string $id): bool
{
return isset($this->transports[$id]);
}
public function set(string $id, TransportInterface $transport): void
{
$this->transports[$id] = $transport;
}
}