QueueFake
class QueueFake extends QueueManager implements Queue
Properties
| protected Application | $app | The application instance. |
from QueueManager |
| protected array | $connections | The array of resolved queue connections. |
from QueueManager |
| protected array | $connectors | The array of resolved queue connectors. |
from QueueManager |
| protected array | $jobs | All of the jobs that have been pushed. |
Methods
Register an event listener for the exception occurred job event.
Register an event listener for the daemon queue loop.
Register an event listener for the failed job event.
Register an event listener for the daemon queue stopping.
Resolve a queue connection instance.
Get the connector for a given driver.
Get the full name for the given connection.
Dynamically pass calls to the default connection.
Assert if a job was pushed based on a truth-test callback.
Assert if a job was pushed based on a truth-test callback.
Determine if a job was pushed based on a truth-test callback.
Get all of the jobs matching a truth-test callback.
Determine if there are any stored jobs for a given class.
Get the size of the queue.
Push a new job onto the queue.
Push a raw payload onto the queue.
Push a new job onto the queue.
Push an array of jobs onto the queue.
Get the connection name for the queue.
Set the connection name for the queue.
Details
in
QueueManager at line 42
void
__construct(Application $app)
Create a new queue manager instance.
in
QueueManager at line 53
void
before(mixed $callback)
Register an event listener for the before job event.
in
QueueManager at line 64
void
after(mixed $callback)
Register an event listener for the after job event.
in
QueueManager at line 75
void
exceptionOccurred(mixed $callback)
Register an event listener for the exception occurred job event.
in
QueueManager at line 86
void
looping(mixed $callback)
Register an event listener for the daemon queue loop.
in
QueueManager at line 97
void
failing(mixed $callback)
Register an event listener for the failed job event.
in
QueueManager at line 108
void
stopping(mixed $callback)
Register an event listener for the daemon queue stopping.
in
QueueManager at line 119
bool
connected(string $name = null)
Determine if the driver is connected.
at line 106
Queue
connection(mixed $value = null)
Resolve a queue connection instance.
in
QueueManager at line 152
protected Queue
resolve(string $name)
Resolve a queue connection.
in
QueueManager at line 169
protected ConnectorInterface
getConnector(string $driver)
Get the connector for a given driver.
in
QueueManager at line 185
void
extend(string $driver, Closure $resolver)
Add a queue connection resolver.
in
QueueManager at line 197
void
addConnector(string $driver, Closure $resolver)
Add a queue connection resolver.
in
QueueManager at line 208
protected array
getConfig(string $name)
Get the queue connection configuration.
in
QueueManager at line 222
string
getDefaultDriver()
Get the name of the default queue connection.
in
QueueManager at line 233
void
setDefaultDriver(string $name)
Set the name of the default queue connection.
in
QueueManager at line 244
string
getName(string $connection = null)
Get the full name for the given connection.
in
QueueManager at line 254
bool
isDownForMaintenance()
Determine if the application is in maintenance mode.
in
QueueManager at line 266
mixed
__call(string $method, array $parameters)
Dynamically pass calls to the default connection.
at line 25
void
assertPushed(string $job, callable|null $callback = null)
Assert if a job was pushed based on a truth-test callback.
at line 41
void
assertPushedOn(string $queue, string $job, callable|null $callback = null)
Assert if a job was pushed based on a truth-test callback.
at line 59
void
assertNotPushed(string $job, callable|null $callback = null)
Determine if a job was pushed based on a truth-test callback.
at line 74
Collection
pushed(string $job, callable|null $callback = null)
Get all of the jobs matching a truth-test callback.
at line 95
bool
hasPushed(string $job)
Determine if there are any stored jobs for a given class.
at line 117
int
size(string $queue = null)
Get the size of the queue.
at line 130
mixed
push(string $job, mixed $data = '', string $queue = null)
Push a new job onto the queue.
at line 146
mixed
pushRaw(string $payload, string $queue = null, array $options = [])
Push a raw payload onto the queue.
at line 160
mixed
later(DateTime|int $delay, string $job, mixed $data = '', string $queue = null)
Push a new job onto the queue after a delay.
at line 173
mixed
pushOn(string $queue, string $job, mixed $data = '')
Push a new job onto the queue.
at line 187
mixed
laterOn(string $queue, DateTime|int $delay, string $job, mixed $data = '')
Push a new job onto the queue after a delay.
at line 198
Job|null
pop(string $queue = null)
Pop the next job off of the queue.
at line 211
mixed
bulk(array $jobs, mixed $data = '', string $queue = null)
Push an array of jobs onto the queue.
at line 223
string
getConnectionName()
Get the connection name for the queue.
at line 234
$this
setConnectionName(string $name)
Set the connection name for the queue.