/** * Bootstrap any application services. * * @param \Illuminate\Bus\Dispatcher $dispatcher * @return void */ public function boot(Dispatcher $dispatcher) { $dispatcher->mapUsing(function ($command) { return Dispatcher::simpleMapping($command, 'App\\Commands', 'App\\Handlers\\Commands'); }); }
/** * Set the pipes through which commands should be piped before dispatching. * * @param array $pipes * @return $this * @static */ public static function pipeThrough($pipes) { return \Collective\Bus\Dispatcher::pipeThrough($pipes); }
public function testMarshallArguments() { $instance = new Dispatcher(new Container()); $result = $instance->dispatchFromArray('BusDispatcherTestArgumentMapping', ['flag' => false, 'emptyString' => '']); $this->assertTrue($result); }
/** * Boot the service provider. * * @param \Collective\Bus\Dispatcher $dispatcher */ public function boot(Dispatcher $dispatcher) { $dispatcher->mapUsing(function ($command) { return Dispatcher::simpleMapping($command, 'Gitamin', 'Gitamin\\Handlers'); }); }