当前位置: 首页>>代码示例>>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;未经允许,请勿转载。