Properties

$name

$name : string

Queue name

Type

string

$application

$application : \Pop\Application

Application object

Type

\Pop\Application

Methods

__construct()

__construct(string  $name, \Pop\Queue\Adapter\AdapterInterface  $adapter, \Pop\Application  $application = null) 

Constructor

Instantiate the queue object

Parameters

string $name
\Pop\Queue\Adapter\AdapterInterface $adapter
\Pop\Application $application

getName()

getName() : string

Get the queue name

Returns

string

application()

application() : \Pop\Application

Get the application

Returns

\Pop\Application

hasApplication()

hasApplication() : boolean

Has application

Returns

boolean

addWorkers()

addWorkers(array  $workers) : \Pop\Queue\Queue

Add workers

Parameters

array $workers

Returns

\Pop\Queue\Queue

getWorkers()

getWorkers() : array

Get workers

Returns

array

hasWorkers()

hasWorkers() : boolean

Has workers

Returns

boolean

addSchedulers()

addSchedulers(array  $schedulers) : \Pop\Queue\Queue

Add schedulers

Parameters

array $schedulers

Returns

\Pop\Queue\Queue

getSchedulers()

getSchedulers() : array

Get schedulers

Returns

array

hasSchedulers()

hasSchedulers() : boolean

Has schedulers

Returns

boolean

pushSchedulers()

pushSchedulers() : array

Push scheduled jobs to queue adapter

Returns

array

pushWorkers()

pushWorkers() : array

Push worker jobs to queue adapter

Returns

array

pushAll()

pushAll() : array

Push all jobs to queue adapter

Returns

array

processSchedulers()

processSchedulers() : \Pop\Queue\Queue

Process schedulers in the queue

Returns

\Pop\Queue\Queue

processWorkers()

processWorkers() : \Pop\Queue\Queue

Process schedulers in the queue

Returns

\Pop\Queue\Queue

processAll()

processAll() : \Pop\Queue\Queue

Process all schedulers and workers in the queue

Returns

\Pop\Queue\Queue

isQueued()

isQueued(mixed  $jobId) : boolean

Check if job is queued, but hasn't run yet

Parameters

mixed $jobId

Returns

boolean

isCompleted()

isCompleted(mixed  $jobId) : boolean

Check if job is completed (alias)

Parameters

mixed $jobId

Returns

boolean

hasFailed()

hasFailed(mixed  $jobId) : boolean

Check if job has failed (alias)

Parameters

mixed $jobId

Returns

boolean

hasJob()

hasJob(mixed  $jobId) : boolean

Check if queue has job

Parameters

mixed $jobId

Returns

boolean

getJob()

getJob(mixed  $jobId, boolean  $unserialize = true) : array

Get job

Parameters

mixed $jobId
boolean $unserialize

Returns

array

hasJobs()

hasJobs() : boolean

Check if queue has jobs

Returns

boolean

getJobs()

getJobs() : array

Get queue jobs

Returns

array

hasCompletedJob()

hasCompletedJob(mixed  $jobId) : boolean

Check if queue has completed job

Parameters

mixed $jobId

Returns

boolean

getCompletedJob()

getCompletedJob(mixed  $jobId, boolean  $unserialize = true) : array

Get completed job

Parameters

mixed $jobId
boolean $unserialize

Returns

array

hasCompletedJobs()

hasCompletedJobs() : boolean

Check if queue has completed jobs

Returns

boolean

getCompletedJobs()

getCompletedJobs() : array

Get queue completed jobs

Returns

array

hasFailedJob()

hasFailedJob(mixed  $jobId) : boolean

Check if queue has failed job

Parameters

mixed $jobId

Returns

boolean

getFailedJob()

getFailedJob(mixed  $jobId, boolean  $unserialize = true) : array

Get failed job

Parameters

mixed $jobId
boolean $unserialize

Returns

array

hasFailedJobs()

hasFailedJobs() : boolean

Check if queue adapter has failed jobs

Returns

boolean

getFailedJobs()

getFailedJobs() : array

Get queue failed jobs

Returns

array

clear()

clear(boolean  $all = false) : void

Clear jobs off of the queue stack

Parameters

boolean $all

clearFailed()

clearFailed() : void

Clear failed jobs off of the queue stack

flush()

flush(boolean  $all = false) : void

Flush all jobs off of the queue stack

Parameters

boolean $all

flushFailed()

flushFailed() : void

Flush all failed jobs off of the queue stack

flushAll()

flushAll() : void

Flush all pop queue items