Auth_Yadis_domxml Klassenreferenz

Abgeleitet von Auth_Yadis_XMLParser.

Zusammengehörigkeiten von Auth_Yadis_domxml:

Collaboration graph
[Legende]

Öffentliche Methoden

 Auth_Yadis_domxml ()
 setXML ($xml_string)
 registerNamespace ($prefix, $uri)
evalXPath ($xpath, $node=null)
 content ($node)
 attributes ($node)

Ausführliche Beschreibung

Definiert in Zeile 136 der Datei XML.php.


Dokumentation der Elementfunktionen

attributes ( node  ) 

Return the attributes of a specified node.

Parameter:
mixed $node A node object from a previous call to $this->evalXPath().
Rückgabe:
array $attrs An array mapping attribute names to values.

Erneute Implementation von Auth_Yadis_XMLParser.

Definiert in Zeile 193 der Datei XML.php.

00194     {
00195         if ($node) {
00196             $arr = $node->attributes();
00197             $result = array();
00198 
00199             if ($arr) {
00200                 foreach ($arr as $attrnode) {
00201                     $result[$attrnode->name] = $attrnode->value;
00202                 }
00203             }
00204 
00205             return $result;
00206         }
00207     }

Definiert in Zeile 137 der Datei XML.php.

00138     {
00139         $this->xml = null;
00140         $this->doc = null;
00141         $this->xpath = null;
00142         $this->errors = array();
00143     }

content ( node  ) 

Return the textual content of a specified node.

Parameter:
mixed $node A node object from a previous call to $this->evalXPath().
Rückgabe:
string $content The content of this node.

Erneute Implementation von Auth_Yadis_XMLParser.

Definiert in Zeile 186 der Datei XML.php.

00187     {
00188         if ($node) {
00189             return $node->get_content();
00190         }
00191     }

& evalXPath ( xpath,
node = null 
)

Evaluate an XPath expression and return the resulting node list. This should be overridden by subclasses.

Parameter:
string $xpath The XPath expression to be evaluated.
mixed $node A node object resulting from a previous evalXPath call. This node, if specified, provides the context for the evaluation of this xpath expression.
Rückgabe:
array $node_list An array of matching opaque node objects to be used with other methods of this parser class.

Erneute Implementation von Auth_Yadis_XMLParser.

Definiert in Zeile 165 der Datei XML.php.

00166     {
00167         if ($node) {
00168             $result = @$this->xpath->xpath_eval($xpath, $node);
00169         } else {
00170             $result = @$this->xpath->xpath_eval($xpath);
00171         }
00172 
00173         if (!$result) {
00174             $n = array();
00175             return $n;
00176         }
00177 
00178         if (!$result->nodeset) {
00179             $n = array();
00180             return $n;
00181         }
00182 
00183         return $result->nodeset;
00184     }

registerNamespace ( prefix,
uri 
)

Register a namespace with the XML parser. This should be overridden by subclasses.

Parameter:
string $prefix The namespace prefix to appear in XML tag names.
string $uri The namespace URI to be used to identify the namespace in the XML.
Rückgabe:
boolean $result True if the registration succeeded; false otherwise.

Erneute Implementation von Auth_Yadis_XMLParser.

Definiert in Zeile 160 der Datei XML.php.

00161     {
00162         return xpath_register_ns($this->xpath, $prefix, $uri);
00163     }

setXML ( xml_string  ) 

Set this parser object's XML payload. This should be overridden by subclasses.

Parameter:
string $xml_string The XML string to pass to this object's XML parser.
Rückgabe:
boolean $result True if the initialization succeeded; false otherwise.

Erneute Implementation von Auth_Yadis_XMLParser.

Definiert in Zeile 145 der Datei XML.php.

00146     {
00147         $this->xml = $xml_string;
00148         $this->doc = @domxml_open_mem($xml_string, DOMXML_LOAD_PARSING,
00149                                       $this->errors);
00150 
00151         if (!$this->doc) {
00152             return false;
00153         }
00154 
00155         $this->xpath = $this->doc->xpath_new_context();
00156 
00157         return true;
00158     }


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen