当前位置: 首页>>代码示例>>PHP>>正文


PHP EntityManager::getPartialReference方法代码示例

本文整理汇总了PHP中Doctrine\ORM\EntityManager::getPartialReference方法的典型用法代码示例。如果您正苦于以下问题:PHP EntityManager::getPartialReference方法的具体用法?PHP EntityManager::getPartialReference怎么用?PHP EntityManager::getPartialReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\ORM\EntityManager的用法示例。


在下文中一共展示了EntityManager::getPartialReference方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function it_should_delete_entity(ManagerRegistry $registry, EntityManager $em)
 {
     $em->getPartialReference('foo', 1)->willReturn(42);
     $em->remove(42)->shouldBeCalled();
     $em->flush()->shouldBeCalled();
     $registry->getManager(null)->willReturn($em);
     $this->setRegistry($registry);
     $this->delete(1)->shouldBe(true);
 }
开发者ID:Im0rtality,项目名称:rest-api-bundle,代码行数:9,代码来源:DoctrineOrmSourceSpec.php

示例2: delete

 /**
  * Delete an Entity according to given (list of) id(s)
  * @param type $ids array/single
  * @return boolean
  */
 function delete($ids)
 {
     try {
         if (!is_array($ids)) {
             $ids = array($ids);
         }
         foreach ($ids as $id) {
             $entity = $this->em->getPartialReference($this->entity, $id);
             $this->em->remove($entity);
         }
         $this->em->flush();
         return TRUE;
     } catch (Exception $err) {
         log_message("error", $err->getMessage(), false);
         return FALSE;
     }
 }
开发者ID:csiber,项目名称:codeigniterplus,代码行数:22,代码来源:My_DModel.php

示例3: getPartialReference

 /**
  * {@inheritdoc}
  */
 public function getPartialReference($entityName, $identifier)
 {
     return $this->wrapped->getPartialReference($entityName, $identifier);
 }
开发者ID:lstrojny,项目名称:doctrine-fun,代码行数:7,代码来源:EntityManagerDecorator.php

示例4: getPartialReference

 /**
  * {@inheritDoc}
  *
  * @static 
  */
 public static function getPartialReference($entityName, $identifier)
 {
     return \Doctrine\ORM\EntityManager::getPartialReference($entityName, $identifier);
 }
开发者ID:kodorider,项目名称:renta,代码行数:9,代码来源:_ide_helper.php

示例5: _fillSessionInformation

 /**
  * @param \Sgdoce\Model\Entity\ArtefatoImagem $artefatoImagemEntity
  * @param \Doctrine\ORM\EntityManager $entityManager
  * @return void
  */
 private function _fillSessionInformation(ArtefatoImagemEntity $artefatoImagemEntity, EntityManager $entityManager)
 {
     $pessoaEntity = $entityManager->getPartialReference('app:VwPessoa', \Core_Integration_Sica_User::getPersonId());
     $unidadeOrgEntity = $entityManager->getPartialReference('app:VwUnidadeOrg', \Core_Integration_Sica_User::getUserUnit());
     $artefatoImagemEntity->setSqPessoa($pessoaEntity);
     $artefatoImagemEntity->setSqUnidadeOrg($unidadeOrgEntity);
 }
开发者ID:sgdoc,项目名称:sgdoce-codigo,代码行数:12,代码来源:ArtefatoImagem.php


注:本文中的Doctrine\ORM\EntityManager::getPartialReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。