Horde_Xml_Element::registerNamespace PHP Method

registerNamespace() public static method

Takes a prefix and a full namespace URI and adds them to the list of registered namespaces for use by Horde_Xml_Element::lookupNamespace().
public static registerNamespace ( string $prefix, string $namespaceURI )
$prefix string The namespace prefix
$namespaceURI string The full namespace URI
    public static function registerNamespace($prefix, $namespaceURI)
    {
        self::$_namespaces[$prefix] = $namespaceURI;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param resource|string $xml The XML document received from the server.
  */
 public function __construct($xml)
 {
     if (is_resource($xml)) {
         rewind($xml);
         $xml = stream_get_contents($xml);
     }
     parent::registerNamespace('xlink', 'http://www.w3.org/1999/xlink');
     parent::__construct($xml);
 }
All Usage Examples Of Horde_Xml_Element::registerNamespace