Property | Type | Description | |
---|---|---|---|
$container | Illuminate\Contracts\Container\Container | The container implementation. | |
$mapper | Closure | The fallback mapping Closure. | |
$mappings | array | All of the command-to-handler mappings. | |
$pipeline | Illuminate\Pipeline\Pipeline | The pipeline instance for the bus. | |
$pipes | array | The pipes to send commands through before dispatching. | |
$queueResolver | Closure | null | The queue resolver callback. |
Method | Description | |
---|---|---|
__construct ( Illuminate\Contracts\Container\Container $container, Closure $queueResolver = null ) : void | Create a new command dispatcher instance. | |
dispatch ( mixed $command, Closure $afterResolving = null ) : mixed | Dispatch a command to its appropriate handler. | |
dispatchFrom ( mixed $command, ArrayAccess $source, array $extras = [] ) : mixed | Marshal a command and dispatch it to its appropriate handler. | |
dispatchFromArray ( mixed $command, array $array ) : mixed | Marshal a command and dispatch it to its appropriate handler. | |
dispatchNow ( mixed $command, Closure $afterResolving = null ) : mixed | Dispatch a command to its appropriate handler in the current process. | |
dispatchToQueue ( mixed $command ) : mixed | Dispatch a command to its appropriate handler behind a queue. | |
getHandlerClass ( mixed $command ) : string | Get the handler class for the given command. | |
getHandlerMethod ( mixed $command ) : string | Get the handler method for the given command. | |
mapUsing ( Closure $mapper ) : void | Register a fallback mapper callback. | |
maps ( array $commands ) : void | Register command-to-handler mappings. | |
pipeThrough ( array $pipes ) | Set the pipes through which commands should be piped before dispatching. | |
resolveHandler ( mixed $command ) : mixed | Get the handler instance for the given command. | |
simpleMapping ( mixed $command, string $commandNamespace, string $handlerNamespace ) : string | Map the command to a handler within a given root namespace. |
Method | Description | |
---|---|---|
commandShouldBeQueued ( mixed $command ) : boolean | Determine if the given command should be queued. | |
getMapperSegment ( mixed $command, integer $segment ) : string | Get the given segment from a given class handler using the custom mapper. | |
getMappingSegment ( string $className, integer $segment ) : string | Get the given segment from a given class handler. | |
getParameterValueForCommand ( string $command, ArrayAccess $source, ReflectionParameter $parameter, array $extras = [] ) : mixed | Get a parameter value for a marshaled command. | |
inflectSegment ( mixed $command, integer $segment ) : string | Get the given handler segment for the given command. | |
marshal ( string $command, ArrayAccess $source, array $extras = [] ) : mixed | Marshal a command from the given array accessible object. | |
marshalFromArray ( string $command, array $array ) : mixed | Marshal a command from the given array. | |
pushCommandToQueue ( Illuminate\Contracts\Queue\Queue $queue, mixed $command ) : mixed | Push the command onto the given queue instance. |
public __construct ( Illuminate\Contracts\Container\Container $container, Closure $queueResolver = null ) : void | ||
$container | Illuminate\Contracts\Container\Container | |
$queueResolver | Closure | |
return | void |
protected commandShouldBeQueued ( mixed $command ) : boolean | ||
$command | mixed | |
return | boolean |
public dispatchFrom ( mixed $command, ArrayAccess $source, array $extras = [] ) : mixed | ||
$command | mixed | |
$source | ArrayAccess | |
$extras | array | |
return | mixed |
public dispatchToQueue ( mixed $command ) : mixed | ||
$command | mixed | |
return | mixed |
public getHandlerClass ( mixed $command ) : string | ||
$command | mixed | |
return | string |
public getHandlerMethod ( mixed $command ) : string | ||
$command | mixed | |
return | string |
protected getParameterValueForCommand ( string $command, ArrayAccess $source, ReflectionParameter $parameter, array $extras = [] ) : mixed | ||
$command | string | |
$source | ArrayAccess | |
$parameter | ReflectionParameter | |
$extras | array | |
return | mixed |
protected marshal ( string $command, ArrayAccess $source, array $extras = [] ) : mixed | ||
$command | string | |
$source | ArrayAccess | |
$extras | array | |
return | mixed |
public pipeThrough ( array $pipes ) | ||
$pipes | array |
protected pushCommandToQueue ( Illuminate\Contracts\Queue\Queue $queue, mixed $command ) : mixed | ||
$queue | Illuminate\Contracts\Queue\Queue | |
$command | mixed | |
return | mixed |
public resolveHandler ( mixed $command ) : mixed | ||
$command | mixed | |
return | mixed |
protected Container,Illuminate\Contracts\Container $container | ||
return | Illuminate\Contracts\Container\Container |
protected Closure $mapper | ||
return | Closure |
protected array $mappings | ||
return | array |
protected Pipeline,Illuminate\Pipeline $pipeline | ||
return | Illuminate\Pipeline\Pipeline |
protected array $pipes | ||
return | array |