0 follower

Interface Yiisoft\Queue\Provider\QueueProviderInterface

Implemented byYiisoft\Queue\Debug\QueueProviderInterfaceProxy, Yiisoft\Queue\Provider\AdapterFactoryQueueProvider, Yiisoft\Queue\Provider\CompositeQueueProvider, Yiisoft\Queue\Provider\PrototypeQueueProvider

QueueProviderInterface provides a way to get a queue instance by channel name.

Public Methods

Hide inherited methods

Method Description Defined By
get() Find a queue by channel name and returns it. Yiisoft\Queue\Provider\QueueProviderInterface
has() Check if a queue with the specified channel name exists. Yiisoft\Queue\Provider\QueueProviderInterface

Constants

Hide inherited constants

Constant Value Description Defined By
DEFAULT_CHANNEL 'yii-queue' Yiisoft\Queue\Provider\QueueProviderInterface

Method Details

Hide inherited methods

get() public abstract method

Find a queue by channel name and returns it.

public abstract get( \BackedEnum|string $channel ): Yiisoft\Queue\QueueInterface
$channel \BackedEnum|string

Channel name.

return Yiisoft\Queue\QueueInterface

Queue instance.

throws Yiisoft\Queue\Provider\InvalidQueueConfigException

If the queue configuration is invalid.

throws Yiisoft\Queue\Provider\ChannelNotFoundException

If the channel is not found.

throws Yiisoft\Queue\Provider\QueueProviderException

If the queue provider fails to provide a queue.

                public function get(string|BackedEnum $channel): QueueInterface;

            
has() public abstract method

Check if a queue with the specified channel name exists.

public abstract has( \BackedEnum|string $channel ): boolean
$channel \BackedEnum|string

Channel name.

return boolean

Whether the queue exists.

                public function has(string|BackedEnum $channel): bool;