public function register(Container $app)
 {
     $app[CommandBus::class] = function () use($app) {
         return new SimpleBusCommandBus($app);
     };
     $app[EventBus::class] = function () use($app) {
         return new SimpleBusEventBus($app);
     };
     $app['command_bus'] = function () use($app) {
         return $app[CommandBus::class];
     };
     $app['event_bus'] = function () use($app) {
         return $app[CommandBus::class];
     };
     $app->after(function () use($app) {
         $events = EventsRecorder::recordedEvents();
         foreach ($events as $event) {
             $app[EventBus::class]->fire($event);
         }
     });
     return $app;
 }