Dispatcher (Bus)
Dispatcher
class Dispatcher implements Dispatcher, QueueingDispatcher, HandlerResolver (View source)
Methods
void | __construct( Container $container, Closure $queueResolver = null) Create a new command dispatcher instance. | |
mixed | dispatchFromArray( mixed $command, array $array) Marshal a command and dispatch it to its appropriate handler. | |
mixed | dispatchFrom( mixed $command, ArrayAccess $source, array $extras = array()) Marshal a command and dispatch it to its appropriate handler. | |
mixed | dispatch( mixed $command, Closure $afterResolving = null) Dispatch a command to its appropriate handler. | |
mixed | dispatchNow( mixed $command, Closure $afterResolving = null) Dispatch a command to its appropriate handler in the current process. | |
mixed | dispatchToQueue( mixed $command) Dispatch a command to its appropriate handler behind a queue. | |
mixed | resolveHandler( mixed $command) Get the handler instance for the given command. | |
string | getHandlerClass( mixed $command) Get the handler class for the given command. | |
string | getHandlerMethod( mixed $command) Get the handler method for the given command. | |
void | maps( array $commands) Register command-to-handler mappings. | |
void | mapUsing( Closure $mapper) Register a fallback mapper callback. | |
static string | simpleMapping( mixed $command, string $commandNamespace, string $handlerNamespace) Map the command to a handler within a given root namespace. | |
$this | pipeThrough( array $pipes) Set the pipes through which commands should be piped before dispatching. |
Details
void __construct( Container $container, Closure $queueResolver = null)
Create a new command dispatcher instance.
mixed dispatchFromArray( mixed $command, array $array)
Marshal a command and dispatch it to its appropriate handler.
mixed dispatchFrom( mixed $command, ArrayAccess $source, array $extras = array())
Marshal a command and dispatch it to its appropriate handler.
mixed dispatch( mixed $command, Closure $afterResolving = null)
Dispatch a command to its appropriate handler.
mixed dispatchNow( mixed $command, Closure $afterResolving = null)
Dispatch a command to its appropriate handler in the current process.
mixed dispatchToQueue( mixed $command)
Dispatch a command to its appropriate handler behind a queue.
mixed resolveHandler( mixed $command)
Get the handler instance for the given command.
string getHandlerClass( mixed $command)
Get the handler class for the given command.
string getHandlerMethod( mixed $command)
Get the handler method for the given command.
void maps( array $commands)
Register command-to-handler mappings.
void mapUsing( Closure $mapper)
Register a fallback mapper callback.
static string simpleMapping( mixed $command, string $commandNamespace, string $handlerNamespace)
Map the command to a handler within a given root namespace.
$this pipeThrough( array $pipes)
Set the pipes through which commands should be piped before dispatching.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Bus/Dispatcher.html