\Omega\Queue\Adapter AbstractQueueAdapter

Abstract queue adapter class.

The AbstractQueueAdapter class provides a foundation for building specific queue adapters by defining common methods that a queue system should support. Queue adapters are responsible for pushing jobs onto the queue and shifting jobs off the queue for processing.

Summary

Methods
Properties
Constants
__construct
push
shift
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Methods

__construct()

__construct() : void

AbstractQueueAdapter class constructor.

Returns

void —

push()

push(\Closure  $closure, mixed  ...$params) : int|string

Push a job onto the queue.

Parameters

\Closure $closure

Holds the closure representing the job to be pushed onto the queue.

mixed $params variadic

Holds additional parameters needed for the job.

Returns

int|string —

Returns the job identifier or status code.

shift()

shift() : ?\Omega\Queue\Job

Shift the next job off the queue.

Returns

?\Omega\Queue\Job —

Returns the next job to be processed, or null if the queue is empty.