/** * 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(); }