| 1 | <?php |
||
| 13 | final class LimitQueueProcessor implements QueueProcessorInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var TransportInterface |
||
| 17 | */ |
||
| 18 | private $transport; |
||
| 19 | /** |
||
| 20 | * @var iterable|QueueInterface[] |
||
| 21 | */ |
||
| 22 | private $queue; |
||
| 23 | /** |
||
| 24 | * @var int |
||
| 25 | */ |
||
| 26 | private $limit; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param TransportInterface $transport |
||
| 30 | * @param QueueInterface[] $queue |
||
| 31 | */ |
||
| 32 | 5 | public function __construct(TransportInterface $transport, iterable $queue, int $limit) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | 5 | public function process(): int |
|
| 68 | } |
||
| 69 |