コード例 #1
0
ファイル: IdentityMap.php プロジェクト: averor/entity-manager
 /**
  * @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
ファイル: UnitOfWork.php プロジェクト: averor/entity-manager
 /**
  * @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]);
 }