/** * @param EntityInterface $entity * @return $this|void */ public function remove(EntityInterface $entity) { $uuid = (string) $entity->getUuid(); if (!$this->has($uuid)) { return $this; } unset($this->map[$uuid]); return $this; }
/** * @param EntityInterface $entity */ public function applyDelete(EntityInterface $entity) { $id = (string) $entity->getId(); $repo = $this->entityManager->getRepository(get_class($entity)); $repo->delete($entity); $this->identityMap->remove($entity); $this->removeEntityState($entity); unset($this->scheduledForDelete[$id]); }