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