public function extractAggregateId($anEventSourcedAggregateRoot): string
    {
        if (null === $this->aggregateIdExtractor) {
            $this->aggregateIdExtractor = function (): string {
                return $this->aggregateId();
            };
        }

        return $this->aggregateIdExtractor->call($anEventSourcedAggregateRoot);
    }
public function extractAggregateId($anEventSourcedAggregateRoot): string
    {
        if (null === $this->aggregateIdExtractor) {
            $this->aggregateIdExtractor = function (): string {
                return $this->aggregateId();
            };
        }

        return $this->aggregateIdExtractor->call($anEventSourcedAggregateRoot);
    }
@param object $anEventSourcedAggregateRoot

@return string