protected function publishStream(StreamInterface $stream): EventStoreRepository
    {
        foreach ($stream as $domainEventMessage) {
            $this
                ->getEventPublisher()
                ->publish($domainEventMessage);
        }

        return $this;
    }
protected function publishStream(StreamInterface $stream): EventStoreRepository
    {
        foreach ($stream as $domainEventMessage) {
            $this
                ->getEventPublisher()
                ->publish($domainEventMessage);
        }

        return $this;
    }
protected function publishStream ( StreamInterface $ stream ) : EventStoreRepository { foreach ( $ stream as $ domainEventMessage ) { $ this -> getEventPublisher ( ) -> publish ( $ domainEventMessage ) ; } return $ this ; }
Publish stream to event listeners.

@param StreamInterface $stream
@return EventStoreRepository
Publish stream to event listeners .