• PHP reference
  • Queue

BatchJob

class Services\Queue\BatchJob

Way to easily add a group of jobs to the queue and keep track of them.

Methods

__construct(string $key = null)

Constructor.

Parameters

  • string $key

BatchJob addTask(string $type, mixed $data)

Add a new queue task to the job.

Parameters

  • string $type
  • mixed $data

Return Value

BatchJob add($type, $data)

Shorthand for self::addTask().

Parameters

  • $type
  • $data

Return Value

BatchJob removeTask(string $job)

Detach a task from the job.

Parameters

  • string $job

Return Value

array|float progress(boolean $as_array = false)

Get job progress.

Parameters

  • boolean $as_array

Return Value

  • array|float

BatchJob status(string $status = null)

Get or set status message.

Parameters

  • string $status

Return Value