public function replayHistory(EventDispatcher $eventDispatcher): void
    {
        $allEvents = $this->storageFacility->loadAllEvents();
        foreach ($allEvents as $rawEvent) {
            $eventDispatcher->dispatch($this->restoreEvent($rawEvent));
        }
    }
public function replayHistory(EventDispatcher $eventDispatcher): void
    {
        $allEvents = $this->storageFacility->loadAllEvents();
        foreach ($allEvents as $rawEvent) {
            $eventDispatcher->dispatch($this->restoreEvent($rawEvent));
        }
    }
public function replayHistory ( EventDispatcher $ eventDispatcher ) : void { $ allEvents = $ this -> storageFacility -> loadAllEvents ( ) ; foreach ( $ allEvents as $ rawEvent ) { $ eventDispatcher -> dispatch ( $ this -> restoreEvent ( $ rawEvent ) ) ; } }
Load all previous events and dispatch them to the provided EventDispatcher.

@param EventDispatcher $eventDispatcher
Load all previous events and dispatch them to the provided EventDispatcher .