0 follower

Interface Yiisoft\Queue\Provider\QueueProviderInterface

Implemented byYiisoft\Queue\Debug\QueueProviderInterfaceProxy, Yiisoft\Queue\Provider\CompositeQueueProvider, Yiisoft\Queue\Provider\PredefinedQueueProvider, Yiisoft\Queue\Provider\QueueFactoryProvider

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

Public Methods

Hide inherited methods

Method Description Defined By
get() Finds a queue by name and returns it. Yiisoft\Queue\Provider\QueueProviderInterface
getNames() Returns a list of queue names. Yiisoft\Queue\Provider\QueueProviderInterface
has() Check if a queue with the specified name exists. Yiisoft\Queue\Provider\QueueProviderInterface

Method Details

Hide inherited methods

get() public abstract method

Finds a queue by name and returns it.

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

Queue name.

return Yiisoft\Queue\QueueInterface

Queue instance.

throws Yiisoft\Queue\Provider\InvalidQueueConfigException

If the queue configuration is invalid.

throws Yiisoft\Queue\Provider\QueueNotFoundException

If the queue is not found.

throws Yiisoft\Queue\Provider\QueueProviderException

If the queue provider fails to provide a queue.

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

            
getNames() public abstract method

Returns a list of queue names.

public abstract string[] getNames ( )
return string[]

Queue names.

                public function getNames(): array;

            
has() public abstract method

Check if a queue with the specified name exists.

public abstract boolean has ( \BackedEnum|string $name )
$name \BackedEnum|string

Queue name.

return boolean

Whether the queue exists.

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