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 a new entity. */ abstract public function getNew(): Entity; /** * Fetch an entity by ID. */ abstract public function getById(string $id): ?Entity; /** * Store an entity. */ abstract public function save(Entity $entity): void; }