예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 /**
  * @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]);
 }