\Charcoal\QueueQueueManagerInterface

The queue manager is used to load queued items and batch-process them.

Summary

Methods
Constants
setQueueId()
queueId()
setItemSuccessCallback()
setItemFailureCallback()
setProcessedCallback()
processQueue()
loadQueueItems()
queueItemProto()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setQueueId()

setQueueId(mixed  $id) : \Charcoal\Queue\QueueManagerInterface

Set the queue's ID.

Parameters

mixed $id

The unique queue identifier.

Returns

\Charcoal\Queue\QueueManagerInterface

Chainable

queueId()

queueId() : mixed

Get the queue's ID.

Returns

mixed

setItemSuccessCallback()

setItemSuccessCallback(callable  $callback) : \Charcoal\Queue\QueueManagerInterface

Set the callback routine when the item is resolved.

Parameters

callable $callback

A item callback routine.

Returns

\Charcoal\Queue\QueueManagerInterface

Chainable

setItemFailureCallback()

setItemFailureCallback(callable  $callback) : \Charcoal\Queue\QueueManagerInterface

Set the callback routine when the item is rejected.

Parameters

callable $callback

A item callback routine.

Returns

\Charcoal\Queue\QueueManagerInterface

Chainable

setProcessedCallback()

setProcessedCallback(callable  $callback) : \Charcoal\Queue\QueueManagerInterface

Set the callback routine when the queue is processed.

Parameters

callable $callback

A queue callback routine.

Returns

\Charcoal\Queue\QueueManagerInterface

Chainable

processQueue()

processQueue() : boolean

Process the items of the queue.

Returns

boolean —

Success / Failure

loadQueueItems()

loadQueueItems() : \Charcoal\Queue\Collection

Retrieve the items of the current queue.

Returns

\Charcoal\Queue\Collection