Properties

$table

$table : string

Job table

Type

string

$failedTable

$failedTable : string

Failed job table

Type

string

Methods

hasJob()

hasJob(mixed  $jobId) : boolean

Check if queue stack has job

Parameters

mixed $jobId

Returns

boolean

getJob()

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

Get job from queue stack by job ID

Parameters

mixed $jobId
boolean $unserialize

Returns

array

updateJob()

updateJob(mixed  $jobId, mixed  $completed = false, mixed  $increment = false) : void

Update job from queue stack by job ID

Parameters

mixed $jobId
mixed $completed
mixed $increment

hasJobs()

hasJobs(mixed  $queue) : boolean

Check if queue has jobs

Parameters

mixed $queue

Returns

boolean

getJobs()

getJobs(mixed  $queue, boolean  $unserialize = true) : array

Get queue jobs

Parameters

mixed $queue
boolean $unserialize

Returns

array

hasCompletedJob()

hasCompletedJob(mixed  $jobId) : boolean

Check if queue stack has completed job

Parameters

mixed $jobId

Returns

boolean

hasCompletedJobs()

hasCompletedJobs(mixed  $queue) : boolean

Check if queue has completed jobs

Parameters

mixed $queue

Returns

boolean

getCompletedJob()

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

Get queue completed job

Parameters

mixed $jobId
boolean $unserialize

Returns

array

getCompletedJobs()

getCompletedJobs(mixed  $queue, boolean  $unserialize = true) : array

Get queue completed jobs

Parameters

mixed $queue
boolean $unserialize

Returns

array

hasFailedJob()

hasFailedJob(mixed  $jobId) : boolean

Check if queue stack has failed job

Parameters

mixed $jobId

Returns

boolean

getFailedJob()

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

Get failed job from queue stack by job ID

Parameters

mixed $jobId
boolean $unserialize

Returns

array

hasFailedJobs()

hasFailedJobs(mixed  $queue) : boolean

Check if queue adapter has failed jobs

Parameters

mixed $queue

Returns

boolean

getFailedJobs()

getFailedJobs(mixed  $queue, boolean  $unserialize = true) : array

Get queue jobs

Parameters

mixed $queue
boolean $unserialize

Returns

array

push()

push(mixed  $queue, mixed  $job, mixed  $priority = null) : string

Push job onto queue stack

Parameters

mixed $queue
mixed $job
mixed $priority

Returns

string

failed()

failed(mixed  $queue, mixed  $jobId, \Exception  $exception = null) : void

Move failed job to failed queue stack

Parameters

mixed $queue
mixed $jobId
\Exception $exception

pop()

pop(mixed  $jobId) : void

Pop job off of queue stack

Parameters

mixed $jobId

clear()

clear(mixed  $queue, boolean  $all = false) : void

Clear jobs off of the queue stack

Parameters

mixed $queue
boolean $all

clearFailed()

clearFailed(mixed  $queue) : void

Clear failed jobs off of the queue stack

Parameters

mixed $queue

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

__construct()

__construct(\Pop\Db\Adapter\AbstractAdapter  $db, string  $table = 'pop_queue_jobs', string  $failedTable = 'pop_queue_failed_jobs') 

Constructor

Instantiate the database queue object

Parameters

\Pop\Db\Adapter\AbstractAdapter $db
string $table
string $failedTable

getTable()

getTable() : string

Get the job table

Returns

string

getFailedTable()

getFailedTable() : string

Get the failed job table

Returns

string

createTable()

createTable(string  $table) : \Pop\Queue\Adapter\Db

Create the queue job table

Parameters

string $table

Returns

\Pop\Queue\Adapter\Db

createFailedTable()

createFailedTable(string  $failedTable) : \Pop\Queue\Adapter\Db

Create the queue failed job table

Parameters

string $failedTable

Returns

\Pop\Queue\Adapter\Db