Db
extends AbstractAdapter
in package
Database queue adapter class
Tags
Table of Contents
- $db : AbstractAdapter
- Database adapter
- $failedTable : string
- Failed job table
- $table : string
- Job table
- __construct() : mixed
- Constructor
- clear() : void
- Clear jobs off of the queue stack
- clearFailed() : void
- Clear failed jobs off of the queue stack
- createFailedTable() : Db
- Create the queue failed job table
- createTable() : Db
- Create the queue job table
- db() : AbstractAdapter
- Get the database object
- failed() : void
- Move failed job to failed queue stack
- flush() : void
- Flush all jobs off of the queue stack
- flushAll() : void
- Flush all pop queue items
- flushFailed() : void
- Flush all failed jobs off of the queue stack
- getCompletedJob() : array<string|int, mixed>
- Get queue completed job
- getCompletedJobs() : array<string|int, mixed>
- Get queue completed jobs
- getFailedJob() : array<string|int, mixed>
- Get failed job from queue stack by job ID
- getFailedJobs() : array<string|int, mixed>
- Get queue jobs
- getFailedTable() : string
- Get the failed job table
- getJob() : array<string|int, mixed>
- Get job from queue stack by job ID
- getJobs() : array<string|int, mixed>
- Get queue jobs
- getTable() : string
- Get the job table
- hasCompletedJob() : bool
- Check if queue stack has completed job
- hasCompletedJobs() : bool
- Check if queue has completed jobs
- hasFailedJob() : bool
- Check if queue stack has failed job
- hasFailedJobs() : bool
- Check if queue adapter has failed jobs
- hasJob() : bool
- Check if queue stack has job
- hasJobs() : bool
- Check if queue has jobs
- pop() : void
- Pop job off of queue stack
- push() : string
- Push job onto queue stack
- updateJob() : void
- Update job from queue stack by job ID
Properties
$db
Database adapter
protected
AbstractAdapter
$db
= null
$failedTable
Failed job table
protected
string
$failedTable
= null
$table
Job table
protected
string
$table
= null
Methods
__construct()
Constructor
public
__construct(AbstractAdapter $db[, string $table = 'pop_queue_jobs' ][, string $failedTable = 'pop_queue_failed_jobs' ]) : mixed
Instantiate the database queue object
Parameters
- $db : AbstractAdapter
- $table : string = 'pop_queue_jobs'
- $failedTable : string = 'pop_queue_failed_jobs'
Return values
mixed —clear()
Clear jobs off of the queue stack
public
clear(mixed $queue[, bool $all = false ]) : void
Parameters
- $queue : mixed
- $all : bool = false
Return values
void —clearFailed()
Clear failed jobs off of the queue stack
public
clearFailed(mixed $queue) : void
Parameters
- $queue : mixed
Return values
void —createFailedTable()
Create the queue failed job table
public
createFailedTable(string $failedTable) : Db
Parameters
- $failedTable : string
Return values
Db —createTable()
Create the queue job table
public
createTable(string $table) : Db
Parameters
- $table : string
Return values
Db —db()
Get the database object
public
db() : AbstractAdapter
Return values
AbstractAdapter —failed()
Move failed job to failed queue stack
public
failed(mixed $queue, mixed $jobId[, Exception $exception = null ]) : void
Parameters
- $queue : mixed
- $jobId : mixed
- $exception : Exception = null
Return values
void —flush()
Flush all jobs off of the queue stack
public
flush([bool $all = false ]) : void
Parameters
- $all : bool = false
Return values
void —flushAll()
Flush all pop queue items
public
flushAll() : void
Return values
void —flushFailed()
Flush all failed jobs off of the queue stack
public
flushFailed() : void
Return values
void —getCompletedJob()
Get queue completed job
public
getCompletedJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getCompletedJobs()
Get queue completed jobs
public
getCompletedJobs(mixed $queue[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $queue : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getFailedJob()
Get failed job from queue stack by job ID
public
getFailedJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getFailedJobs()
Get queue jobs
public
getFailedJobs(mixed $queue[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $queue : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getFailedTable()
Get the failed job table
public
getFailedTable() : string
Return values
string —getJob()
Get job from queue stack by job ID
public
getJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getJobs()
Get queue jobs
public
getJobs(mixed $queue[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $queue : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getTable()
Get the job table
public
getTable() : string
Return values
string —hasCompletedJob()
Check if queue stack has completed job
public
hasCompletedJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasCompletedJobs()
Check if queue has completed jobs
public
hasCompletedJobs(mixed $queue) : bool
Parameters
- $queue : mixed
Return values
bool —hasFailedJob()
Check if queue stack has failed job
public
hasFailedJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasFailedJobs()
Check if queue adapter has failed jobs
public
hasFailedJobs(mixed $queue) : bool
Parameters
- $queue : mixed
Return values
bool —hasJob()
Check if queue stack has job
public
hasJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasJobs()
Check if queue has jobs
public
hasJobs(mixed $queue) : bool
Parameters
- $queue : mixed
Return values
bool —pop()
Pop job off of queue stack
public
pop(mixed $jobId) : void
Parameters
- $jobId : mixed
Return values
void —push()
Push job onto queue stack
public
push(mixed $queue, mixed $job[, mixed $priority = null ]) : string
Parameters
- $queue : mixed
- $job : mixed
- $priority : mixed = null
Return values
string —updateJob()
Update job from queue stack by job ID
public
updateJob(mixed $jobId[, mixed $completed = false ][, mixed $increment = false ]) : void
Parameters
- $jobId : mixed
- $completed : mixed = false
- $increment : mixed = false