當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。