| 1 | <?php |
||
| 9 | class DelayStrategyResolver |
||
| 10 | { |
||
| 11 | public const DEFAULT_STRATEGY = 'default_delay_strategy'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | protected $handlers; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $queuesConfiguration; |
||
| 22 | |||
| 23 | 3 | public function __construct(iterable $handlers, array $queuesConfiguration = []) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $queueName |
||
| 31 | * |
||
| 32 | * @return DelayStrategyInterface |
||
| 33 | * @throws UnknownStrategyKeyException |
||
| 34 | */ |
||
| 35 | 5 | public function getStrategy(string $queueName): DelayStrategyInterface |
|
| 45 | |||
| 46 | 1 | public function getDefaultStrategy(): DelayStrategyInterface |
|
| 50 | } |
||
| 51 |