public function initializeState(DomainEventStream $stream): void
    {
        foreach ($stream as $message) {
            ++$this->playhead;
            $this->handleRecursively($message->getPayload());
        }
    }
public function initializeState(DomainEventStream $stream): void
    {
        foreach ($stream as $message) {
            ++$this->playhead;
            $this->handleRecursively($message->getPayload());
        }
    }
public function initializeState ( DomainEventStream $ stream ) : void { foreach ( $ stream as $ message ) { ++ $ this -> playhead ; $ this -> handleRecursively ( $ message -> getPayload ( ) ) ; } }
Initializes the aggregate using the given "history" of events.
Initializes the aggregate using the given history of events .