/**
  * Returns the type identifier of the aggregates in this repository.
  * 
  * @return string
  * @throws \RuntimeException
  */
 public function getTypeIdentifier()
 {
     if (null === $this->factory) {
         throw new \RuntimeException("Either an aggregate factory must be configured (recommended), " . "or the getTypeIdentifier() method must be overridden.");
     }
     return $this->factory->getTypeIdentifier();
 }
 public function registerAggregateFactory(AggregateFactoryInterface $aggregateFactory)
 {
     return $this->registerRepository(new EventSourcingRepository($aggregateFactory->getAggregateType(), $this->eventBus, new NullLockManager(), $this->eventStore, $aggregateFactory));
 }