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


PHP EntityManager::getClassMetaData方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->artisan('doctrine:schema:create');
     $this->em = $this->app->make(EntityManager::class);
     $this->repository = new DoctrineUserRepository($this->em, $this->em->getClassMetaData(User::class));
 }
开发者ID:Evyy,项目名称:cffs-api,代码行数:7,代码来源:DoctrineUserRepositoryTest.php

示例2: updateProgramYearSteward

 /**
  * @param ProgramYearStewardInterface $programYearSteward
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateProgramYearSteward(ProgramYearStewardInterface $programYearSteward, $andFlush = true, $forceId = false)
 {
     $this->em->persist($programYearSteward);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($programYearSteward));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:ProgramYearStewardManager.php

示例3: updateCurriculumInventoryAcademicLevel

 /**
  * @param CurriculumInventoryAcademicLevelInterface $curriculumInventoryAcademicLevel
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateCurriculumInventoryAcademicLevel(CurriculumInventoryAcademicLevelInterface $curriculumInventoryAcademicLevel, $andFlush = true, $forceId = false)
 {
     $this->em->persist($curriculumInventoryAcademicLevel);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($curriculumInventoryAcademicLevel));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:CurriculumInventoryAcademicLevelManager.php

示例4: updateCurriculumInventorySequenceBlockSession

 /**
  * @param CurriculumInventorySequenceBlockSessionInterface $curriculumInventorySequenceBlockSession
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateCurriculumInventorySequenceBlockSession(CurriculumInventorySequenceBlockSessionInterface $curriculumInventorySequenceBlockSession, $andFlush = true, $forceId = false)
 {
     $this->em->persist($curriculumInventorySequenceBlockSession);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($curriculumInventorySequenceBlockSession));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:CurriculumInventorySequenceBlockSessionManager.php

示例5: updateAlertChangeType

 /**
  * @param AlertChangeTypeInterface $alertChangeType
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateAlertChangeType(AlertChangeTypeInterface $alertChangeType, $andFlush = true, $forceId = false)
 {
     $this->em->persist($alertChangeType);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($alertChangeType));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:AlertChangeTypeManager.php

示例6: updateAamcMethod

 /**
  * @param AamcMethodInterface $aamcMethod
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateAamcMethod(AamcMethodInterface $aamcMethod, $andFlush = true, $forceId = false)
 {
     $this->em->persist($aamcMethod);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($aamcMethod));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:AamcMethodManager.php

示例7: updateSessionLearningMaterial

 /**
  * @param SessionLearningMaterialInterface $sessionLearningMaterial
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateSessionLearningMaterial(SessionLearningMaterialInterface $sessionLearningMaterial, $andFlush = true, $forceId = false)
 {
     $this->em->persist($sessionLearningMaterial);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($sessionLearningMaterial));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:SessionLearningMaterialManager.php

示例8: updateMeshUserSelection

 /**
  * @param MeshUserSelectionInterface $meshUserSelection
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateMeshUserSelection(MeshUserSelectionInterface $meshUserSelection, $andFlush = true, $forceId = false)
 {
     $this->em->persist($meshUserSelection);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($meshUserSelection));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:MeshUserSelectionManager.php

示例9: updateMeshPreviousIndexing

 /**
  * @param MeshPreviousIndexingInterface $meshPreviousIndexing
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateMeshPreviousIndexing(MeshPreviousIndexingInterface $meshPreviousIndexing, $andFlush = true, $forceId = false)
 {
     $this->em->persist($meshPreviousIndexing);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($meshPreviousIndexing));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:MeshPreviousIndexingManager.php

示例10: updateReportPoValue

 /**
  * @param ReportPoValueInterface $reportPoValue
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateReportPoValue(ReportPoValueInterface $reportPoValue, $andFlush = true, $forceId = false)
 {
     $this->em->persist($reportPoValue);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($reportPoValue));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:saschaben,项目名称:ilios,代码行数:16,代码来源:ReportPoValueManager.php

示例11: updateInstructionHours

 /**
  * @param InstructionHoursInterface $instructionHours
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateInstructionHours(InstructionHoursInterface $instructionHours, $andFlush = true, $forceId = false)
 {
     $this->em->persist($instructionHours);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($instructionHours));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:InstructionHoursManager.php

示例12: updateUserMadeReminder

 /**
  * @param UserMadeReminderInterface $userMadeReminder
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateUserMadeReminder(UserMadeReminderInterface $userMadeReminder, $andFlush = true, $forceId = false)
 {
     $this->em->persist($userMadeReminder);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($userMadeReminder));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:UserMadeReminderManager.php

示例13: updateCohort

 /**
  * @param CohortInterface $cohort
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateCohort(CohortInterface $cohort, $andFlush = true, $forceId = false)
 {
     $this->em->persist($cohort);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($cohort));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:CohortManager.php

示例14: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     self::$em = static::$kernel->getContainer()->get('doctrine')->getManager();
     self::$tool = new SchemaTool(self::$em);
     self::$userClasses = [self::$em->getClassMetaData('Sulu\\Bundle\\TestBundle\\Entity\\TestContact'), self::$em->getClassMetaData('Sulu\\Bundle\\TestBundle\\Entity\\TestUser')];
     self::$tool->dropSchema(self::$userClasses);
     self::$tool->createSchema(self::$userClasses);
     static::$kernel->getContainer()->set('sulu_security.user_repository', static::$kernel->getContainer()->get('test_user_provider'));
 }
开发者ID:Silwereth,项目名称:sulu,代码行数:11,代码来源:DatabaseTestCase.php

示例15: updateLearningMaterialUserRole

 /**
  * @param LearningMaterialUserRoleInterface $learningMaterialUserRole
  * @param bool $andFlush
  * @param bool $forceId
  */
 public function updateLearningMaterialUserRole(LearningMaterialUserRoleInterface $learningMaterialUserRole, $andFlush = true, $forceId = false)
 {
     $this->em->persist($learningMaterialUserRole);
     if ($forceId) {
         $metadata = $this->em->getClassMetaData(get_class($learningMaterialUserRole));
         $metadata->setIdGenerator(new AssignedGenerator());
     }
     if ($andFlush) {
         $this->em->flush();
     }
 }
开发者ID:profcab,项目名称:ilios,代码行数:16,代码来源:LearningMaterialUserRoleManager.php


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