Ejemplo n.º 1
0
 /**
  * Forward to DOMXPath->registerNamespace()
  *
  * @param string $prefix The prefix to use
  * @param string $uri    The uri to assign to this prefix
  *
  * @throws fDOMException
  *
  * @return void
  */
 public function registerNamespace($prefix, $uri)
 {
     if (is_null($this->xp)) {
         $this->getDOMXPath();
     }
     if (!$this->xp->registerNamespace($prefix, $uri)) {
         throw new fDOMException("Registering namespace '{$uri}' with prefix '{$prefix}' failed.", fDOMException::RegistrationFailed);
     }
     $this->prefixes[$prefix] = $uri;
 }