class Illuminate / Queue / Queue
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
abstract

Queue

Uses

Properties

protected

$container Container

The IoC container instance.

Default: null
protected

$connectionName string

The connection name for the queue.

Default: null
protected

$dispatchAfterCommit bool

Indicates that jobs should be dispatched after all database transactions have committed.

Default: null
protected static

$createPayloadCallbacks callable[]

The create payload callbacks.

Default: []

Methods

public

pushOn ( $queue , $job , $data ) : mixed

Push a new job onto the queue.

Parameters

  • $queue string
  • $job string
  • $data mixed
public

laterOn ( $queue , $delay , $job , $data ) : mixed

Push a new job onto a specific queue after (n) seconds.

Parameters

public

bulk ( $jobs , $data , $queue ) : void

Push an array of jobs onto the queue.

Parameters

  • $jobs array
  • $data mixed
  • $queue string|null
protected

createPayload ( $job , $queue , $data ) : string

Create a payload string from the given job and data.

Parameters

  • $job Closure |string|object
  • $queue string
  • $data mixed
protected

createPayloadArray ( $job , $queue , $data ) : array

Create a payload array from the given job and data.

Parameters

  • $job string|object
  • $queue string
  • $data mixed
protected

createObjectPayload ( $job , $queue ) : array

Create a payload for an object-based queue handler.

Parameters

  • $job object
  • $queue string
protected

getDisplayName ( $job ) : string

Get the display name for the given job.

Parameters

  • $job object
public

getJobBackoff ( $job ) : mixed

Get the backoff for an object-based queue handler.

Parameters

  • $job mixed
public

getJobExpiration ( $job ) : mixed

Get the expiration timestamp for an object-based queue handler.

Parameters

  • $job mixed
protected

jobShouldBeEncrypted ( $job ) : bool

Determine if the job should be encrypted.

Parameters

  • $job object
protected

createStringPayload ( $job , $queue , $data ) : array

Create a typical, string based queue payload array.

Parameters

  • $job string
  • $queue string
  • $data mixed
public static

createPayloadUsing ( $callback ) : void

Register a callback to be executed when creating job payloads.

Parameters

  • $callback callable|null
protected

withCreatePayloadHooks ( $queue , array $payload ) : array

Create the given payload using any registered payload hooks.

Parameters

  • $queue string
  • $payload array
protected

enqueueUsing ( $job , $payload , $queue , $delay , $callback ) : mixed

Enqueue a job using the given callback.

Parameters

protected

shouldDispatchAfterCommit ( $job ) : bool

Determine if the job should be dispatched after all database transactions have committed.

Parameters

protected

raiseJobQueuedEvent ( $jobId , $job ) : void

Raise the job queued event.

Parameters

  • $jobId string|int|null
  • $job Closure |string|object
public

getConnectionName ( ) : string

Get the connection name for the queue.

public

setConnectionName ( $name ) : $this

Set the connection name for the queue.

Parameters

  • $name string
public

getContainer ( ) : Container

Get the container instance being used by the connection.

public

setContainer ( Container $container ) : void

Set the IoC container instance.

Parameters