class QueueConnectionFake implements Queue mixin QueueFake

A connection selected on a queue fake, which records jobs on the fake and sends the jobs it does not fake to that connection.

Methods

__construct(QueueFake $fake, string $connection)

Create a new fake queue connection instance.

int
size(UnitEnum|string|null $queue = null)

Get the size of the queue.

int
pendingSize(UnitEnum|string|null $queue = null)

Get the number of pending jobs.

int
delayedSize(UnitEnum|string|null $queue = null)

Get the number of delayed jobs.

int
reservedSize(UnitEnum|string|null $queue = null)

Get the number of reserved jobs.

int|null
creationTimeOfOldestPendingJob(UnitEnum|string|null $queue = null)

Get the creation timestamp of the oldest pending job, excluding delayed jobs.

mixed
push(object|string $job, mixed $data = '', UnitEnum|string|null $queue = null)

Push a new job onto the queue.

mixed
pushOn(UnitEnum|string|null $queue, object|string $job, mixed $data = '')

Push a new job onto the queue.

mixed
pushRaw(string $payload, UnitEnum|string|null $queue = null, array $options = [])

Push a raw payload onto the queue.

mixed
later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', UnitEnum|string|null $queue = null)

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

mixed
laterOn(UnitEnum|string|null $queue, DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '')

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

mixed
bulk(array $jobs, mixed $data = '', UnitEnum|string|null $queue = null)

Push an array of jobs onto the queue.

Job|null
pop(UnitEnum|string|null $queue = null)

Pop the next job off of the queue.

string
getConnectionName()

Get the connection name for the queue.

setConnectionName(string $name)

Set the connection name for the queue.

mixed
__call(string $method, array $parameters)

Forward other calls to the queue fake.

Details

at line 23
__construct(QueueFake $fake, string $connection)

Create a new fake queue connection instance.

Parameters

QueueFake $fake
string $connection

at line 32
int size(UnitEnum|string|null $queue = null)

Get the size of the queue.

Parameters

UnitEnum|string|null $queue

Return Value

int

at line 40
int pendingSize(UnitEnum|string|null $queue = null)

Get the number of pending jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int

at line 48
int delayedSize(UnitEnum|string|null $queue = null)

Get the number of delayed jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int

at line 56
int reservedSize(UnitEnum|string|null $queue = null)

Get the number of reserved jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int

at line 64
int|null creationTimeOfOldestPendingJob(UnitEnum|string|null $queue = null)

Get the creation timestamp of the oldest pending job, excluding delayed jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int|null

at line 72
mixed push(object|string $job, mixed $data = '', UnitEnum|string|null $queue = null)

Push a new job onto the queue.

Parameters

object|string $job
mixed $data
UnitEnum|string|null $queue

Return Value

mixed

at line 80
mixed pushOn(UnitEnum|string|null $queue, object|string $job, mixed $data = '')

Push a new job onto the queue.

Parameters

UnitEnum|string|null $queue
object|string $job
mixed $data

Return Value

mixed

at line 88
mixed pushRaw(string $payload, UnitEnum|string|null $queue = null, array $options = [])

Push a raw payload onto the queue.

Parameters

string $payload
UnitEnum|string|null $queue
array $options

Return Value

mixed

at line 96
mixed later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', UnitEnum|string|null $queue = null)

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

Parameters

DateInterval|DateTimeInterface|int $delay
object|string $job
mixed $data
UnitEnum|string|null $queue

Return Value

mixed

at line 108
mixed laterOn(UnitEnum|string|null $queue, DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '')

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

Parameters

UnitEnum|string|null $queue
DateInterval|DateTimeInterface|int $delay
object|string $job
mixed $data

Return Value

mixed

at line 120
mixed bulk(array $jobs, mixed $data = '', UnitEnum|string|null $queue = null)

Push an array of jobs onto the queue.

Parameters

array $jobs
mixed $data
UnitEnum|string|null $queue

Return Value

mixed

at line 128
Job|null pop(UnitEnum|string|null $queue = null)

Pop the next job off of the queue.

Parameters

UnitEnum|string|null $queue

Return Value

Job|null

at line 136
string getConnectionName()

Get the connection name for the queue.

Return Value

string

at line 146
Queue setConnectionName(string $name)

Set the connection name for the queue.

Parameters

string $name

Return Value

Queue

at line 154
mixed __call(string $method, array $parameters)

Forward other calls to the queue fake.

Parameters

string $method
array $parameters

Return Value

mixed