Final Class Yiisoft\Queue\Provider\PrototypeQueueProvider
| Inheritance | Yiisoft\Queue\Provider\PrototypeQueueProvider |
|---|---|
| Implements | Yiisoft\Queue\Provider\QueueProviderInterface |
Queue provider that only changes the channel name of the base queue.
It can be useful when your queues used the same adapter.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Queue\Provider\PrototypeQueueProvider | |
| get() | Yiisoft\Queue\Provider\PrototypeQueueProvider | |
| has() | Yiisoft\Queue\Provider\PrototypeQueueProvider |
Method Details
| public mixed __construct ( Yiisoft\Queue\QueueInterface $baseQueue, Yiisoft\Queue\Adapter\AdapterInterface $baseAdapter ) | ||
| $baseQueue | Yiisoft\Queue\QueueInterface |
Base queue to use for creating queues. |
| $baseAdapter | Yiisoft\Queue\Adapter\AdapterInterface | |
public function __construct(
private readonly QueueInterface $baseQueue,
private readonly AdapterInterface $baseAdapter,
) {
}
| public Yiisoft\Queue\QueueInterface get ( string|\BackedEnum $channel ) | ||
| $channel | string|\BackedEnum | |
public function get(string|BackedEnum $channel): QueueInterface
{
return $this->baseQueue->withAdapter($this->baseAdapter->withChannel($channel));
}
Signup or Login in order to comment.