src/Aggregate/AggregateRepository.php
protected function determineStreamName(string $aggregateId): StreamName
    {
        if ($this->oneStreamPerAggregate) {
            if (null === $this->streamName) {
                $prefix = $this->aggregateType->toString();
            } else {
                $prefix = $this->streamName->toString();
            }

            return new StreamName($prefix . '-' . $aggregateId);
        }

        if (null === $this->streamName) {
            return new StreamName('event_stream');
        }

        return $this->streamName;
    }
protected function determineStreamName(string $aggregateId): StreamName
    {
        if ($this->oneStreamPerAggregate) {
            if (null === $this->streamName) {
                $prefix = $this->aggregateType->toString();
            } else {
                $prefix = $this->streamName->toString();
            }

            return new StreamName($prefix . '-' . $aggregateId);
        }

        if (null === $this->streamName) {
            return new StreamName('event_stream');
        }

        return $this->streamName;
    }
protected function determineStreamName ( string $ aggregateId ) : StreamName { if ( $ this -> oneStreamPerAggregate ) { if ( null === $ this -> streamName ) { $ prefix = $ this -> aggregateType -> toString ( ) ; } else { $ prefix = $ this -> streamName -> toString ( ) ; } return new StreamName ( $ prefix . '-' . $ aggregateId ) ; } if ( null === $ this -> streamName ) { return new StreamName ( 'event_stream' ) ; } return $ this -> streamName ; }
Default stream name generation.
Override this method in an extending repository to provide a custom name
Default stream name generation . Override this method in an extending repository to provide a custom name