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