コード例 #1
0
 /**
  * @param InitializeEventStore $command
  */
 public function handle(InitializeEventStore $command)
 {
     $esConfig = EventStoreConfig::initializeWithSqliteDb($command->sqliteDbFile(), $command->eventStoreConfigLocation(), $this->configWriter);
     foreach ($esConfig->popRecordedEvents() as $recordedEvent) {
         $this->eventBus->dispatch($recordedEvent);
     }
 }
コード例 #2
0
 /**
  * @param UndoSystemSetUp $command
  */
 public function handle(UndoSystemSetUp $command)
 {
     $this->eventBus->dispatch(ProcessingConfig::removeConfig($command->processingConfigLocation()));
     $this->eventBus->dispatch(EventStoreConfig::undoEventStoreSetUp($command->eventStoreConfigLocation(), $command->sqliteDbFile()));
 }