Auth_Yadis_domxml
extends Auth_Yadis_XMLParser
in package
This concrete implementation of Auth_Yadis_XMLParser implements the appropriate API for the 'domxml' extension which is typically packaged with PHP 4. This class will be used whenever the 'domxml' extension is detected. See the Auth_Yadis_XMLParser class for details on this class's methods.
Table of Contents
- __construct() : mixed
- attributes() : array<string|int, mixed>
- Return the attributes of a specified node.
- content() : string
- Return the textual content of a specified node.
- evalXPath() : array<string|int, mixed>
- Evaluate an XPath expression and return the resulting node list. This should be overridden by subclasses.
- init() : bool
- Initialize an instance of Auth_Yadis_XMLParser with some XML and namespaces. This SHOULD NOT be overridden by subclasses.
- registerNamespace() : bool
- Register a namespace with the XML parser. This should be overridden by subclasses.
- setXML() : bool
- Set this parser object's XML payload. This should be overridden by subclasses.
Methods
__construct()
public
__construct() : mixed
Return values
mixed —attributes()
Return the attributes of a specified node.
public
attributes(mixed $node) : array<string|int, mixed>
Parameters
- $node : mixed
-
A node object from a previous call to $this->evalXPath().
Return values
array<string|int, mixed> —An array mapping attribute names to values.
content()
Return the textual content of a specified node.
public
content(mixed $node) : string
Parameters
- $node : mixed
-
A node object from a previous call to $this->evalXPath().
Return values
string —$content The content of this node.
evalXPath()
Evaluate an XPath expression and return the resulting node list. This should be overridden by subclasses.
public
& evalXPath(mixed $xpath[, mixed $node = null ]) : array<string|int, mixed>
Parameters
- $xpath : mixed
-
The XPath expression to be evaluated.
- $node : mixed = null
-
A node object resulting from a previous evalXPath call. This node, if specified, provides the context for the evaluation of this xpath expression.
Return values
array<string|int, mixed> —$node_list An array of matching opaque node objects to be used with other methods of this parser class.
init()
Initialize an instance of Auth_Yadis_XMLParser with some XML and namespaces. This SHOULD NOT be overridden by subclasses.
public
init(string $xml_string, array<string|int, mixed> $namespace_map) : bool
Parameters
- $xml_string : string
-
A string of XML to be parsed.
- $namespace_map : array<string|int, mixed>
-
An array of ($ns_name => $ns_uri) to be registered with the XML parser. May be empty.
Return values
bool —$result True if the initialization and namespace registration(s) succeeded; false otherwise.
registerNamespace()
Register a namespace with the XML parser. This should be overridden by subclasses.
public
registerNamespace(mixed $prefix, mixed $uri) : bool
Parameters
- $prefix : mixed
-
The namespace prefix to appear in XML tag names.
- $uri : mixed
-
The namespace URI to be used to identify the namespace in the XML.
Return values
bool —$result True if the registration succeeded; false otherwise.
setXML()
Set this parser object's XML payload. This should be overridden by subclasses.
public
setXML(mixed $xml_string) : bool
Parameters
- $xml_string : mixed
-
The XML string to pass to this object's XML parser.
Return values
bool —$result True if the initialization succeeded; false otherwise.