Auth_Yadis_dom Klassenreferenz

Abgeleitet von Auth_Yadis_XMLParser.

Zusammengehörigkeiten von Auth_Yadis_dom:

Collaboration graph
[Legende]

Öffentliche Methoden

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

Ausführliche Beschreibung

Definiert in Zeile 219 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 283 der Datei XML.php.

00284     {
00285         if ($node) {
00286             $arr = $node->attributes;
00287             $result = array();
00288 
00289             if ($arr) {
00290                 for ($i = 0; $i < $arr->length; $i++) {
00291                     $node = $arr->item($i);
00292                     $result[$node->nodeName] = $node->nodeValue;
00293                 }
00294             }
00295 
00296             return $result;
00297         }
00298     }

Auth_Yadis_dom (  ) 

Definiert in Zeile 220 der Datei XML.php.

00221     {
00222         $this->xml = null;
00223         $this->doc = null;
00224         $this->xpath = null;
00225         $this->errors = array();
00226     }

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 276 der Datei XML.php.

00277     {
00278         if ($node) {
00279             return $node->textContent;
00280         }
00281     }

& 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 255 der Datei XML.php.

00256     {
00257         if ($node) {
00258             $result = @$this->xpath->query($xpath, $node);
00259         } else {
00260             $result = @$this->xpath->query($xpath);
00261         }
00262 
00263         $n = array();
00264 
00265         if (!$result) {
00266             return $n;
00267         }
00268 
00269         for ($i = 0; $i < $result->length; $i++) {
00270             $n[] = $result->item($i);
00271         }
00272 
00273         return $n;
00274     }

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 250 der Datei XML.php.

00251     {
00252         return $this->xpath->registerNamespace($prefix, $uri);
00253     }

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 228 der Datei XML.php.

00229     {
00230         $this->xml = $xml_string;
00231         $this->doc = new DOMDocument;
00232 
00233         if (!$this->doc) {
00234             return false;
00235         }
00236 
00237         if (!@$this->doc->loadXML($xml_string)) {
00238             return false;
00239         }
00240 
00241         $this->xpath = new DOMXPath($this->doc);
00242 
00243         if ($this->xpath) {
00244             return true;
00245         } else {
00246             return false;
00247         }
00248     }


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