class Manager mixin QueueManager mixin Queue

Traits

Properties

static protected object|null $instance

The current globally used instance.

from  CapsuleManagerTrait
protected Container $container

The container instance.

from  CapsuleManagerTrait
protected QueueManager $manager

The queue manager instance.

Methods

void
setupContainer(Container $container)

Setup the IoC container instance.

void
setAsGlobal()

Make this capsule instance available globally.

getContainer()

Get the IoC container instance.

void
setContainer(Container $container)

Set the IoC container instance.

static void
flushState()

Flush all static state.

connectorContainer()

Get the container used to resolve connector dependencies.

void
registerDefaultConnectors(QueueManager $manager)

Register the connectors on the queue manager.

Closure|null
exceptionReporter()

Get the exception reporter for in-process queue connections.

void
registerNullConnector(QueueManager $manager)

Register the Null queue connector.

void
registerSyncConnector(QueueManager $manager)

Register the Sync queue connector.

void
registerDeferredConnector(QueueManager $manager)

Register the Deferred queue connector.

void
registerBackgroundConnector(QueueManager $manager)

Register the Background queue connector.

void
registerFailoverConnector(QueueManager $manager)

Register the Failover queue connector.

void
registerDatabaseConnector(QueueManager $manager)

Register the database queue connector.

void
registerRedisConnector(QueueManager $manager)

Register the Redis queue connector.

void
registerBeanstalkdConnector(QueueManager $manager)

Register the Beanstalkd queue connector.

void
registerSqsConnector(QueueManager $manager)

Register the Amazon SQS queue connector.

__construct(Container|null $container = null)

Create a new queue capsule manager.

void
setupDefaultConfiguration()

Setup the default queue configuration options.

void
setupManager()

Build the queue manager instance.

void
registerConnectors()

Register the default connectors that the component ships with.

static Queue
connection(UnitEnum|string|null $connection = null)

Get a connection instance from the global manager.

static mixed
push(object|string $job, mixed $data = '', UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)

Push a new job onto the queue.

static mixed
bulk(array $jobs, mixed $data = '', UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)

Push an array of jobs onto the queue.

static mixed
later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)

Push a new job onto the queue after (n) seconds.

getConnection(UnitEnum|string|null $name = null)

Get a registered connection instance.

void
addConnection(array $config, string $name = 'default')

Register a connection with the manager.

getQueueManager()

Get the queue manager instance.

mixed
__call(string $method, array $parameters)

Pass dynamic instance methods to the manager.

static mixed
__callStatic(string $method, array $parameters)

Dynamically pass methods to the default connection.

Details

protected void setupContainer(Container $container)

Setup the IoC container instance.

Parameters

Container $container

Return Value

void

void setAsGlobal()

Make this capsule instance available globally.

Boot or tests only. Swaps the global Capsule instance used by static calls; request-time use races across coroutines.

Return Value

void

Container getContainer()

Get the IoC container instance.

Return Value

Container

void setContainer(Container $container)

Set the IoC container instance.

Boot or tests only. Swaps the Capsule container used by this standalone manager; request-time use races across coroutines.

Parameters

Container $container

Return Value

void

static void flushState()

Flush all static state.

Return Value

void

at line 72
protected Container connectorContainer()

Get the container used to resolve connector dependencies.

Return Value

Container

protected void registerDefaultConnectors(QueueManager $manager)

Register the connectors on the queue manager.

Parameters

QueueManager $manager

Return Value

void

protected Closure|null exceptionReporter()

Get the exception reporter for in-process queue connections.

Return Value

Closure|null

protected void registerNullConnector(QueueManager $manager)

Register the Null queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerSyncConnector(QueueManager $manager)

Register the Sync queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerDeferredConnector(QueueManager $manager)

Register the Deferred queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerBackgroundConnector(QueueManager $manager)

Register the Background queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerFailoverConnector(QueueManager $manager)

Register the Failover queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerDatabaseConnector(QueueManager $manager)

Register the database queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerRedisConnector(QueueManager $manager)

Register the Redis queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerBeanstalkdConnector(QueueManager $manager)

Register the Beanstalkd queue connector.

Parameters

QueueManager $manager

Return Value

void

protected void registerSqsConnector(QueueManager $manager)

Register the Amazon SQS queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 34
__construct(Container|null $container = null)

Create a new queue capsule manager.

Parameters

Container|null $container

at line 48
protected void setupDefaultConfiguration()

Setup the default queue configuration options.

Return Value

void

at line 56
protected void setupManager()

Build the queue manager instance.

Return Value

void

at line 64
protected void registerConnectors()

Register the default connectors that the component ships with.

Return Value

void

at line 80
static Queue connection(UnitEnum|string|null $connection = null)

Get a connection instance from the global manager.

Parameters

UnitEnum|string|null $connection

Return Value

Queue

at line 88
static mixed push(object|string $job, mixed $data = '', UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)

Push a new job onto the queue.

Parameters

object|string $job
mixed $data
UnitEnum|string|null $queue
UnitEnum|string|null $connection

Return Value

mixed

at line 96
static mixed bulk(array $jobs, mixed $data = '', UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)

Push an array of jobs onto the queue.

Parameters

array $jobs
mixed $data
UnitEnum|string|null $queue
UnitEnum|string|null $connection

Return Value

mixed

at line 104
static mixed later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)

Push a new job onto the queue after (n) seconds.

Parameters

DateInterval|DateTimeInterface|int $delay
object|string $job
mixed $data
UnitEnum|string|null $queue
UnitEnum|string|null $connection

Return Value

mixed

at line 112
Queue getConnection(UnitEnum|string|null $name = null)

Get a registered connection instance.

Parameters

UnitEnum|string|null $name

Return Value

Queue

at line 120
void addConnection(array $config, string $name = 'default')

Register a connection with the manager.

Parameters

array $config
string $name

Return Value

void

at line 128
QueueManager getQueueManager()

Get the queue manager instance.

Return Value

QueueManager

at line 136
mixed __call(string $method, array $parameters)

Pass dynamic instance methods to the manager.

Parameters

string $method
array $parameters

Return Value

mixed

at line 144
static mixed __callStatic(string $method, array $parameters)

Dynamically pass methods to the default connection.

Parameters

string $method
array $parameters

Return Value

mixed