Final Class Yiisoft\Queue\Provider\CompositeQueueProvider
| Inheritance | Yiisoft\Queue\Provider\CompositeQueueProvider |
|---|---|
| Implements | Yiisoft\Queue\Provider\QueueProviderInterface |
Composite queue provider.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Queue\Provider\CompositeQueueProvider | |
| get() | Yiisoft\Queue\Provider\CompositeQueueProvider | |
| has() | Yiisoft\Queue\Provider\CompositeQueueProvider |
Method Details
| public mixed __construct ( Yiisoft\Queue\Provider\QueueProviderInterface $providers ) | ||
| $providers | Yiisoft\Queue\Provider\QueueProviderInterface |
Queue providers to use. |
public function __construct(
QueueProviderInterface ...$providers
) {
$this->providers = $providers;
}
| public Yiisoft\Queue\QueueInterface get ( string|\BackedEnum $channel ) | ||
| $channel | string|\BackedEnum | |
public function get(string|BackedEnum $channel): QueueInterface
{
foreach ($this->providers as $provider) {
if ($provider->has($channel)) {
return $provider->get($channel);
}
}
throw new ChannelNotFoundException($channel);
}
Signup or Login in order to comment.