W3cubDocs

/Laravel 5.2

Dispatcher

class Dispatcher implements Dispatcher, QueueingDispatcher (View source)

Methods

void __construct( Container $container, Closure $queueResolver = null)

Create a new command dispatcher instance.

mixed dispatch($command)

Dispatch a command to its appropriate handler.

mixed dispatchNow($command)

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.

$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.

Parameters

Container $container
Closure $queueResolver

Return Value

void

mixed dispatch($command)

Dispatch a command to its appropriate handler.

Parameters

$command

Return Value

mixed

mixed dispatchNow($command)

Dispatch a command to its appropriate handler in the current process.

Parameters

$command

Return Value

mixed

mixed dispatchToQueue( mixed $command)

Dispatch a command to its appropriate handler behind a queue.

Parameters

mixed $command

Return Value

mixed

Exceptions

RuntimeException

$this pipeThrough( array $pipes)

Set the pipes through which commands should be piped before dispatching.

Parameters

array $pipes

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Bus/Dispatcher.html