Documentation

QueueFake extends QueueManager
in package
implements Queue

Interfaces, Classes and Traits

Queue

Table of Contents

$app  : Application
The application instance.
$connections  : array<string|int, mixed>
The array of resolved queue connections.
$connectors  : array<string|int, mixed>
The array of resolved queue connectors.
$jobs  : array<string|int, mixed>
All of the jobs that have been pushed.
__call()  : mixed
Dynamically pass calls to the default connection.
__construct()  : void
Create a new queue manager instance.
addConnector()  : void
Add a queue connection resolver.
after()  : void
Register an event listener for the after job event.
assertNothingPushed()  : void
Assert that no jobs were pushed.
assertNotPushed()  : void
Determine if a job was pushed based on a truth-test callback.
assertPushed()  : void
Assert if a job was pushed based on a truth-test callback.
assertPushedOn()  : void
Assert if a job was pushed based on a truth-test callback.
before()  : void
Register an event listener for the before job event.
bulk()  : mixed
Push an array of jobs onto the queue.
connected()  : bool
Determine if the driver is connected.
connection()  : Queue
Resolve a queue connection instance.
exceptionOccurred()  : void
Register an event listener for the exception occurred job event.
extend()  : void
Add a queue connection resolver.
failing()  : void
Register an event listener for the failed job event.
getConnectionName()  : string
Get the connection name for the queue.
getDefaultDriver()  : string
Get the name of the default queue connection.
getName()  : string
Get the full name for the given connection.
hasPushed()  : bool
Determine if there are any stored jobs for a given class.
isDownForMaintenance()  : bool
Determine if the application is in maintenance mode.
later()  : mixed
Push a new job onto the queue after a delay.
laterOn()  : mixed
Push a new job onto the queue after a delay.
looping()  : void
Register an event listener for the daemon queue loop.
pop()  : Job|null
Pop the next job off of the queue.
push()  : mixed
Push a new job onto the queue.
pushed()  : Collection
Get all of the jobs matching a truth-test callback.
pushOn()  : mixed
Push a new job onto the queue.
pushRaw()  : mixed
Push a raw payload onto the queue.
setConnectionName()  : $this
Set the connection name for the queue.
setDefaultDriver()  : void
Set the name of the default queue connection.
size()  : int
Get the size of the queue.
stopping()  : void
Register an event listener for the daemon queue stopping.
assertPushedTimes()  : void
Assert if a job was pushed a number of times.
getConfig()  : array<string|int, mixed>
Get the queue connection configuration.
getConnector()  : ConnectorInterface
Get the connector for a given driver.
resolve()  : Queue
Resolve a queue connection.

Properties

$connections

The array of resolved queue connections.

protected array<string|int, mixed> $connections = []

$connectors

The array of resolved queue connectors.

protected array<string|int, mixed> $connectors = []

$jobs

All of the jobs that have been pushed.

protected array<string|int, mixed> $jobs = []

Methods

__call()

Dynamically pass calls to the default connection.

public __call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
$method : string
$parameters : array<string|int, mixed>
Return values
mixed

addConnector()

Add a queue connection resolver.

public addConnector(string $driver, Closure $resolver) : void
Parameters
$driver : string
$resolver : Closure
Return values
void

after()

Register an event listener for the after job event.

public after(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

assertNothingPushed()

Assert that no jobs were pushed.

public assertNothingPushed() : void
Return values
void

assertNotPushed()

Determine if a job was pushed based on a truth-test callback.

public assertNotPushed(string $job[, callable|null $callback = null ]) : void
Parameters
$job : string
$callback : callable|null = null
Return values
void

assertPushed()

Assert if a job was pushed based on a truth-test callback.

public assertPushed(string $job[, callable|int|null $callback = null ]) : void
Parameters
$job : string
$callback : callable|int|null = null
Return values
void

assertPushedOn()

Assert if a job was pushed based on a truth-test callback.

public assertPushedOn(string $queue, string $job[, callable|null $callback = null ]) : void
Parameters
$queue : string
$job : string
$callback : callable|null = null
Return values
void

before()

Register an event listener for the before job event.

public before(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

bulk()

Push an array of jobs onto the queue.

public bulk(array<string|int, mixed> $jobs[, mixed $data = '' ][, string $queue = null ]) : mixed
Parameters
$jobs : array<string|int, mixed>
$data : mixed = ''
$queue : string = null
Return values
mixed

connected()

Determine if the driver is connected.

public connected([string $name = null ]) : bool
Parameters
$name : string = null
Return values
bool

connection()

Resolve a queue connection instance.

public connection([mixed $value = null ]) : Queue
Parameters
$value : mixed = null
Return values
Queue

exceptionOccurred()

Register an event listener for the exception occurred job event.

public exceptionOccurred(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

extend()

Add a queue connection resolver.

public extend(string $driver, Closure $resolver) : void
Parameters
$driver : string
$resolver : Closure
Return values
void

failing()

Register an event listener for the failed job event.

public failing(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

getConnectionName()

Get the connection name for the queue.

public getConnectionName() : string
Return values
string

getDefaultDriver()

Get the name of the default queue connection.

public getDefaultDriver() : string
Return values
string

getName()

Get the full name for the given connection.

public getName([string $connection = null ]) : string
Parameters
$connection : string = null
Return values
string

hasPushed()

Determine if there are any stored jobs for a given class.

public hasPushed(string $job) : bool
Parameters
$job : string
Return values
bool

isDownForMaintenance()

Determine if the application is in maintenance mode.

public isDownForMaintenance() : bool
Return values
bool

later()

Push a new job onto the queue after a delay.

public later(DateTime|int $delay, string $job[, mixed $data = '' ][, string $queue = null ]) : mixed
Parameters
$delay : DateTime|int
$job : string
$data : mixed = ''
$queue : string = null
Return values
mixed

laterOn()

Push a new job onto the queue after a delay.

public laterOn(string $queue, DateTime|int $delay, string $job[, mixed $data = '' ]) : mixed
Parameters
$queue : string
$delay : DateTime|int
$job : string
$data : mixed = ''
Return values
mixed

looping()

Register an event listener for the daemon queue loop.

public looping(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

pop()

Pop the next job off of the queue.

public pop([string $queue = null ]) : Job|null
Parameters
$queue : string = null
Return values
Job|null

push()

Push a new job onto the queue.

public push(string $job[, mixed $data = '' ][, string $queue = null ]) : mixed
Parameters
$job : string
$data : mixed = ''
$queue : string = null
Return values
mixed

pushed()

Get all of the jobs matching a truth-test callback.

public pushed(string $job[, callable|null $callback = null ]) : Collection
Parameters
$job : string
$callback : callable|null = null
Return values
Collection

pushOn()

Push a new job onto the queue.

public pushOn(string $queue, string $job[, mixed $data = '' ]) : mixed
Parameters
$queue : string
$job : string
$data : mixed = ''
Return values
mixed

pushRaw()

Push a raw payload onto the queue.

public pushRaw(string $payload[, string $queue = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$payload : string
$queue : string = null
$options : array<string|int, mixed> = []
Return values
mixed

setConnectionName()

Set the connection name for the queue.

public setConnectionName(string $name) : $this
Parameters
$name : string
Return values
$this

setDefaultDriver()

Set the name of the default queue connection.

public setDefaultDriver(string $name) : void
Parameters
$name : string
Return values
void

size()

Get the size of the queue.

public size([string $queue = null ]) : int
Parameters
$queue : string = null
Return values
int

stopping()

Register an event listener for the daemon queue stopping.

public stopping(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

assertPushedTimes()

Assert if a job was pushed a number of times.

protected assertPushedTimes(string $job[, int $times = 1 ]) : void
Parameters
$job : string
$times : int = 1
Return values
void

getConfig()

Get the queue connection configuration.

protected getConfig(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

resolve()

Resolve a queue connection.

protected resolve(string $name) : Queue
Parameters
$name : string
Return values
Queue

Search results