BusFake
in package
implements
Dispatcher
Interfaces, Classes and Traits
Table of Contents
- $commands : array<string|int, mixed>
- The commands that have been dispatched.
- assertDispatched() : void
- Assert if a job was dispatched based on a truth-test callback.
- assertNotDispatched() : void
- Determine if a job was dispatched based on a truth-test callback.
- dispatch() : mixed
- Dispatch a command to its appropriate handler.
- dispatched() : Collection
- Get all of the jobs matching a truth-test callback.
- dispatchNow() : mixed
- Dispatch a command to its appropriate handler in the current process.
- hasDispatched() : bool
- Determine if there are any stored commands for a given class.
- pipeThrough() : $this
- Set the pipes commands should be piped through before dispatching.
- assertDispatchedTimes() : void
- Assert if a job was pushed a number of times.
Properties
$commands
The commands that have been dispatched.
protected
array<string|int, mixed>
$commands
= []
Methods
assertDispatched()
Assert if a job was dispatched based on a truth-test callback.
public
assertDispatched(string $command[, callable|int|null $callback = null ]) : void
Parameters
- $command : string
- $callback : callable|int|null = null
Return values
void —assertNotDispatched()
Determine if a job was dispatched based on a truth-test callback.
public
assertNotDispatched(string $command[, callable|null $callback = null ]) : void
Parameters
- $command : string
- $callback : callable|null = null
Return values
void —dispatch()
Dispatch a command to its appropriate handler.
public
dispatch(mixed $command) : mixed
Parameters
- $command : mixed
Return values
mixed —dispatched()
Get all of the jobs matching a truth-test callback.
public
dispatched(string $command[, callable|null $callback = null ]) : Collection
Parameters
- $command : string
- $callback : callable|null = null
Return values
Collection —dispatchNow()
Dispatch a command to its appropriate handler in the current process.
public
dispatchNow(mixed $command[, mixed $handler = null ]) : mixed
Parameters
- $command : mixed
- $handler : mixed = null
Return values
mixed —hasDispatched()
Determine if there are any stored commands for a given class.
public
hasDispatched(string $command) : bool
Parameters
- $command : string
Return values
bool —pipeThrough()
Set the pipes commands should be piped through before dispatching.
public
pipeThrough(array<string|int, mixed> $pipes) : $this
Parameters
- $pipes : array<string|int, mixed>
Return values
$this —assertDispatchedTimes()
Assert if a job was pushed a number of times.
protected
assertDispatchedTimes(string $command[, int $times = 1 ]) : void
Parameters
- $command : string
- $times : int = 1