\Omega\Queue\Adapter DatabaseQueueAdapter

Database adapter class.

The DatabaseAdapter class serves as a queue adapter for handling jobs using a database backend. It allows pushing closures representing jobs to a queue and retrieving the next job to be processed. *

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.