コード例 #1
0
ファイル: NamespaceRegistry.php プロジェクト: rambo/jackalope
 /**
  * Removes a namespace mapping from the registry. The following restriction
  * apply:
  * * Attempting to unregister a built-in namespace (jcr, nt, mix, sv, xml or
  *   the empty namespace) will throw a \PHPCR\NamespaceException.
  * * An attempt to unregister a namespace that is not currently registered
  *   will throw a \PHPCR\NamespaceException.
  * * An implementation may prevent the unregistering of any other namespace
  *   for implementation-specific reasons by throwing a
  *   \PHPCR\NamespaceException.
  *
  * @param string $prefix The prefix of the mapping to be removed.
  * @return void
  * @throws \PHPCR\NamespaceException unregister a built-in namespace or a namespace that is not currently registered or a namespace whose unregsitration is forbidden for implementation-specific reasons.
  * @throws \PHPCR\UnsupportedRepositoryOperationException if this repository does not support namespace registry changes.
  * @throws \PHPCR\AccessDeniedException if the current session does not have sufficient access to unregister the namespace.
  * @throws \PHPCR\RepositoryException if another error occurs.
  */
 public function unregisterNamespace($prefix)
 {
     $this->namespaceManager->checkPrefix($prefix);
     if (!array_key_exists($prefix, $this->userNamespaces)) {
         //defaultNamespaces would throw an exception in checkPrefix already
         throw new \PHPCR\NamespaceException("Prefix {$prefix} is not currently registered");
     }
     throw new NotImplementedException('Write');
 }