QueueInterface
in
Queue interface
Table of Contents
Methods
- addJob() : bool
- Add job to queue
- clear() : bool
- Delete all jobs
- create() : JobInterface|null
- Create job obj
- deleteJob() : bool
- Delete job
- deleteJobs() : bool
- Delete jobs
- executeJob() : JobInterface|null
- Execute job
- getJob() : array<string|int, mixed>|null
- Find job by name, id or uuid
- getJobs() : array<string|int, mixed>
- Get jobs
- getJobsDue() : array<string|int, mixed>|null
- Get all jobs due
- getNext() : JobInterface|null
- Get next job
- getRecuringJobs() : array<string|int, mixed>|null
- Get recurring jobs
- run() : JobInterface|null
- Run job
Methods
addJob()
Add job to queue
public
addJob(JobInterface $job[, string|null $extension = null ][, bool $disabled = false ][, string|null $recuringInterval = null ][, int|null $scheduleTime = null ][, array<string|int, mixed>|null $config = null ]) : bool
Parameters
- $job : JobInterface
- $extension : string|null = null
- $disabled : bool = false
- $recuringInterval : string|null = null
- $scheduleTime : int|null = null
- $config : array<string|int, mixed>|null = null
Return values
boolclear()
Delete all jobs
public
clear() : bool
Return values
boolcreate()
Create job obj
public
create(string $class[, array<string|int, mixed>|null $params = null ][, string|null $extension = null ]) : JobInterface|null
Parameters
- $class : string
-
job class or name
- $params : array<string|int, mixed>|null = null
- $extension : string|null = null
Return values
JobInterface|nulldeleteJob()
Delete job
public
deleteJob(string|int $id) : bool
Parameters
- $id : string|int
-
Job id, uiid
Return values
booldeleteJobs()
Delete jobs
public
deleteJobs([array<string|int, mixed> $filter = [] ]) : bool
Parameters
- $filter : array<string|int, mixed> = []
Return values
boolexecuteJob()
Execute job
public
executeJob(JobInterface $job[, Closure|null $onJobProgress = null ][, Closure|null $onJobProgressError = null ]) : JobInterface|null
Parameters
- $job : JobInterface
- $onJobProgress : Closure|null = null
- $onJobProgressError : Closure|null = null
Return values
JobInterface|nullgetJob()
Find job by name, id or uuid
public
getJob(string|int $id) : array<string|int, mixed>|null
Parameters
- $id : string|int
-
Job id, uiid or name
Return values
array<string|int, mixed>|nullgetJobs()
Get jobs
public
getJobs([array<string|int, mixed> $filter = [] ]) : array<string|int, mixed>
Parameters
- $filter : array<string|int, mixed> = []
Return values
array<string|int, mixed>getJobsDue()
Get all jobs due
public
getJobsDue([string|null $jobName = null ]) : array<string|int, mixed>|null
Parameters
- $jobName : string|null = null
Return values
array<string|int, mixed>|nullgetNext()
Get next job
public
getNext() : JobInterface|null
Return values
JobInterface|nullgetRecuringJobs()
Get recurring jobs
public
getRecuringJobs([string|null $extension = null ]) : array<string|int, mixed>|null
Parameters
- $extension : string|null = null
Return values
array<string|int, mixed>|nullrun()
Run job
public
run(string|JobInterface $name[, array<string|int, mixed>|null $params = null ][, string|null $extension = null ][, Closure|null $onJobProgress = null ][, Closure|null $onJobProgressError = null ]) : JobInterface|null
Parameters
- $name : string|JobInterface
- $params : array<string|int, mixed>|null = null
- $extension : string|null = null
- $onJobProgress : Closure|null = null
- $onJobProgressError : Closure|null = null