Ejemplo n.º 1
0
 /**
  * Boot the service provider.
  *
  * @param \AltThree\Bus\Dispatcher $dispatcher
  */
 public function boot(Dispatcher $dispatcher)
 {
     $dispatcher->mapUsing(function ($command) {
         return Dispatcher::simpleMapping($command, 'CachetHQ\\Cachet', 'CachetHQ\\Cachet\\Handlers');
     });
     Str::macro('canonicalize', function ($url) {
         return preg_replace('/([^\\/])$/', '$1/', $url);
     });
 }
Ejemplo n.º 2
0
 /**
  * Boot the service provider.
  *
  * @param \AltThree\Bus\Dispatcher $dispatcher
  */
 public function boot(Dispatcher $dispatcher)
 {
     $dispatcher->mapUsing(function ($command) {
         return Dispatcher::simpleMapping($command, 'CachetHQ\\Cachet\\Bus', 'CachetHQ\\Cachet\\Bus\\Handlers');
     });
     $dispatcher->pipeThrough([UseDatabaseTransactions::class]);
     Str::macro('canonicalize', function ($url) {
         return preg_replace('/([^\\/])$/', '$1/', $url);
     });
 }
Ejemplo n.º 3
0
 /**
  * Register command-to-handler mappings.
  *
  * @param array $commands
  *
  * @return void
  */
 public function maps(array $commands)
 {
     $this->dispatcher->maps($commands);
 }