AbstractTaskAdapter
extends AbstractAdapter
in package
implements
TaskAdapterInterface
AbstractYes
Adapter abstract class
Tags
Table of Contents
Interfaces
- TaskAdapterInterface
- Adapter interface
Properties
- $priority : string
- Queue type
Methods
- __construct() : mixed
- Constructor
- clear() : AbstractAdapter
- Clear jobs out of queue
- clearFailed() : AbstractAdapter
- Clear failed jobs out of the queue
- clearTasks() : AbstractTaskAdapter
- Clear all scheduled task
- getEnd() : int
- Get queue end index
- getFailedJob() : mixed
- Get failed job
- getFailedJobs() : array<string|int, mixed>
- Get adapter failed jobs
- getPriority() : string
- Get queue priority
- getStart() : int
- Get queue start index
- getStatus() : int
- Get queue job status
- getTask() : Task|null
- Get scheduled task
- getTaskCount() : int
- Get scheduled tasks count
- getTasks() : array<string|int, mixed>
- Get scheduled tasks
- hasFailedJob() : bool
- Check if adapter has failed job
- hasFailedJobs() : bool
- Check if adapter has failed jobs
- hasJobs() : bool
- Check if adapter has jobs
- hasTasks() : bool
- Has scheduled tasks
- isFifo() : bool
- Is FIFO
- isFilo() : bool
- Is FILO
- isLifo() : bool
- Is LIFO (alias to FILO)
- isLilo() : bool
- Is LILO (alias to FIFO)
- pop() : AbstractJob|null
- Pop job off of queue
- push() : AdapterInterface
- Push job on to queue
- removeTask() : AbstractTaskAdapter
- Remove scheduled task
- schedule() : AbstractTaskAdapter
- Schedule job with queue
- setPriority() : AbstractAdapter
- Set queue priority
- updateTask() : AbstractTaskAdapter
- Update scheduled task
Properties
$priority
Queue type
protected
string
$priority
= 'FIFO'
Methods
__construct()
Constructor
public
__construct([string|null $priority = null ]) : mixed
Instantiate the adapter object
Parameters
- $priority : string|null = null
clear()
Clear jobs out of queue
public
abstract clear() : AbstractAdapter
Return values
AbstractAdapterclearFailed()
Clear failed jobs out of the queue
public
abstract clearFailed() : AbstractAdapter
Return values
AbstractAdapterclearTasks()
Clear all scheduled task
public
abstract clearTasks() : AbstractTaskAdapter
Return values
AbstractTaskAdaptergetEnd()
Get queue end index
public
abstract getEnd() : int
Return values
intgetFailedJob()
Get failed job
public
abstract getFailedJob(int $index[, bool $unserialize = true ]) : mixed
Parameters
- $index : int
- $unserialize : bool = true
getFailedJobs()
Get adapter failed jobs
public
abstract getFailedJobs([bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $unserialize : bool = true
Return values
array<string|int, mixed>getPriority()
Get queue priority
public
getPriority() : string
Return values
stringgetStart()
Get queue start index
public
abstract getStart() : int
Return values
intgetStatus()
Get queue job status
public
abstract getStatus(int $index) : int
Parameters
- $index : int
Return values
intgetTask()
Get scheduled task
public
abstract getTask(string $taskId) : Task|null
Parameters
- $taskId : string
Return values
Task|nullgetTaskCount()
Get scheduled tasks count
public
abstract getTaskCount() : int
Return values
intgetTasks()
Get scheduled tasks
public
abstract getTasks() : array<string|int, mixed>
Return values
array<string|int, mixed>hasFailedJob()
Check if adapter has failed job
public
abstract hasFailedJob(int $index) : bool
Parameters
- $index : int
Return values
boolhasFailedJobs()
Check if adapter has failed jobs
public
abstract hasFailedJobs() : bool
Return values
boolhasJobs()
Check if adapter has jobs
public
abstract hasJobs() : bool
Return values
boolhasTasks()
Has scheduled tasks
public
abstract hasTasks() : bool
Return values
boolisFifo()
Is FIFO
public
isFifo() : bool
Return values
boolisFilo()
Is FILO
public
isFilo() : bool
Return values
boolisLifo()
Is LIFO (alias to FILO)
public
isLifo() : bool
Return values
boolisLilo()
Is LILO (alias to FIFO)
public
isLilo() : bool
Return values
boolpop()
Pop job off of queue
public
abstract pop() : AbstractJob|null
Return values
AbstractJob|nullpush()
Push job on to queue
public
abstract push(AbstractJob $job) : AdapterInterface
Parameters
- $job : AbstractJob
Return values
AdapterInterfaceremoveTask()
Remove scheduled task
public
abstract removeTask(string $taskId) : AbstractTaskAdapter
Parameters
- $taskId : string
Return values
AbstractTaskAdapterschedule()
Schedule job with queue
public
abstract schedule(Task $task) : AbstractTaskAdapter
Parameters
- $task : Task
Return values
AbstractTaskAdaptersetPriority()
Set queue priority
public
setPriority([string $priority = 'FIFO' ]) : AbstractAdapter
Parameters
- $priority : string = 'FIFO'
Return values
AbstractAdapterupdateTask()
Update scheduled task
public
abstract updateTask(Task $task) : AbstractTaskAdapter
Parameters
- $task : Task