DigiComp.FlowSymfonyBridge..../Classes/Transport/FailureTransportContainer.php

32 lines
697 B
PHP
Raw Normal View History

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