/**
  * 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);
 }
Exemplo n.º 3
0
 public function testMarshallArguments()
 {
     $instance = new Dispatcher(new Container());
     $result = $instance->dispatchFromArray('BusDispatcherTestArgumentMapping', ['flag' => false, 'emptyString' => '']);
     $this->assertTrue($result);
 }
Exemplo n.º 4
0
 /**
  * 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');
     });
 }