entityType = $entityType; $this->entityFactory = $entityFactory; $this->entityManager = $entityManager; } protected function getEntityFactory(): EntityFactory { return $this->entityFactory; } protected function getEntityManager(): EntityManager { return $this->entityManager; } public function getEntityType(): string { return $this->entityType; } /** * Get an entity. If $id is NULL, a new entity is returned. */ abstract public function get(?string $id = null): ?Entity; /** * Store an entity. */ abstract public function save(Entity $entity): void; }