/** * Resolves a registered namespace alias to the full namespace. * * @param string $entityNamespaceAlias * * @return string the namespace URI * * @throws OHMException */ public function getEntityNamespace($entityNamespaceAlias) { if (!isset($this->attributes['entityNamespaces'][$entityNamespaceAlias])) { throw OHMException::unknownEntityNamespace($entityNamespaceAlias); } return trim($this->attributes['entityNamespaces'][$entityNamespaceAlias], '\\'); }
/** * Resolves a registered namespace alias to the full namespace. * * @param string $alias * @return string * @throws OHMException */ public function getAliasNamespace($alias) { foreach (array_keys($this->getManagers()) as $name) { try { return $this->getManager($name)->getConfiguration()->getEntityNamespace($alias); } catch (OHMException $e) { } } throw OHMException::unknownEntityNamespace($alias); }