當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ORMException::unknownEntityNamespace方法代碼示例

本文整理匯總了PHP中Doctrine\ORM\ORMException::unknownEntityNamespace方法的典型用法代碼示例。如果您正苦於以下問題:PHP ORMException::unknownEntityNamespace方法的具體用法?PHP ORMException::unknownEntityNamespace怎麽用?PHP ORMException::unknownEntityNamespace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Doctrine\ORM\ORMException的用法示例。


在下文中一共展示了ORMException::unknownEntityNamespace方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getAliasNamespace

 /**
  * Resolves a registered namespace alias to the full namespace.
  *
  * This method looks for the alias in all registered entity managers.
  *
  * @see \Doctrine\ORM\Configuration::getEntityNamespace
  * @param string $alias The alias
  * @throws \Doctrine\ORM\ORMException
  * @return string The full namespace
  */
 public function getAliasNamespace($alias)
 {
     foreach (array_keys($this->getManagers()) as $name) {
         try {
             return $this->getManager($name)->getConfiguration()->getEntityNamespace($alias);
         } catch (ORMException $e) {
         }
     }
     throw ORMException::unknownEntityNamespace($alias);
 }
開發者ID:kdyby,項目名稱:doctrine,代碼行數:20,代碼來源:Registry.php

示例2: getAliasNamespace

 /**
  * {@inheritdoc}
  */
 public function getAliasNamespace($alias)
 {
     /** @var EntityManager $entityManager */
     foreach ([$this->entityManager] as $entityManager) {
         try {
             return $entityManager->getConfiguration()->getEntityNamespace($alias);
         } catch (ORMException $e) {
         }
     }
     throw ORMException::unknownEntityNamespace($alias);
 }
開發者ID:sinergi,項目名稱:sage50,代碼行數:14,代碼來源:Doctrine.php

示例3: getAliasNamespace

 /**
  * Resolves a registered namespace alias to the full namespace.
  *
  * This method looks for the alias in all registered object managers.
  *
  * @param string $alias The alias.
  * @return string The full namespace.
  * @throws ORMException
  */
 public function getAliasNamespace($alias)
 {
     foreach (array_keys($this->getManagers()) as $name) {
         try {
             if (($em = $this->getManager($name)) instanceof EntityManager) {
                 return $em->getConfiguration()->getEntityNamespace($alias);
             }
         } catch (ORMException $e) {
             // If any exception is throw when attempting to retrieve then have our custom one thrown
         }
     }
     throw ORMException::unknownEntityNamespace($alias);
 }
開發者ID:jdrich,項目名稱:drest,代碼行數:22,代碼來源:EntityManagerRegistry.php

示例4: getAliasNamespace

 /**
  * @param  string       $alias
  * @return string
  * @throws ORMException
  */
 public function getAliasNamespace($alias)
 {
     foreach ($this->getManagerNames() as $name) {
         try {
             return $this->getManager($name)->getConfiguration()->getEntityNamespace($alias);
         } catch (ORMException $e) {
             // throw the exception only if no manager can solve it
         }
     }
     throw ORMException::unknownEntityNamespace($alias);
 }
開發者ID:saxulum,項目名稱:saxulum-doctrine-orm-manager-registry-provider,代碼行數:16,代碼來源:ManagerRegistry.php

示例5: getEntityNamespace

 /**
  * Resolves a registered namespace alias to the full namespace.
  *
  * @param string $entityNamespaceAlias 
  * @return string
  * @throws MappingException
  */
 public function getEntityNamespace($entityNamespaceAlias)
 {
     if (!isset($this->_attributes['entityNamespaces'][$entityNamespaceAlias])) {
         throw ORMException::unknownEntityNamespace($entityNamespaceAlias);
     }
     return trim($this->_attributes['entityNamespaces'][$entityNamespaceAlias], '\\');
 }
開發者ID:MarS2806,項目名稱:Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD-,代碼行數:14,代碼來源:Configuration.php

示例6: getAliasNamespace

 /**
  * Resolves a registered namespace alias to the full namespace.
  *
  * This method looks for the alias in all registered object managers.
  *
  * @param  string $alias The alias.
  * @return string The full namespace.
  * @throws ORMException
  * @throws \InvalidArgumentException
  */
 public function getAliasNamespace($alias)
 {
     foreach ($this->getManagerNames() as $name) {
         try {
             /* @var $manager \Doctrine\ORM\EntityManagerInterface */
             $manager = $this->getManager($name);
             return $manager->getConfiguration()->getEntityNamespace($alias);
         } catch (ORMException $e) {
             // throw the exception only if no manager can solve it
         }
     }
     throw ORMException::unknownEntityNamespace($alias);
 }
開發者ID:sunnyct,項目名稱:silexcmf-doctrine,代碼行數:23,代碼來源:ManagerRegistry.php


注:本文中的Doctrine\ORM\ORMException::unknownEntityNamespace方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。