PHP Class Auth_Yadis_XMLParser

Exibir arquivo Open project: openid/php-openid

Public Methods

Method Description
attributes ( mixed $node ) : array Return the attributes of a specified node.
content ( mixed $node ) : string Return the textual content of a specified node.
evalXPath ( string $xpath, mixed $node = null ) : array Evaluate an XPath expression and return the resulting node list. This should be overridden by subclasses.
init ( string $xml_string, array $namespace_map ) : boolean Initialize an instance of Auth_Yadis_XMLParser with some XML and namespaces. This SHOULD NOT be overridden by subclasses.
registerNamespace ( string $prefix, string $uri ) : boolean Register a namespace with the XML parser. This should be overridden by subclasses.
setXML ( string $xml_string ) : boolean Set this parser object's XML payload. This should be overridden by subclasses.

Method Details

attributes() public method

Return the attributes of a specified node.
public attributes ( mixed $node ) : array
$node mixed A node object from a previous call to $this->evalXPath().
return array $attrs An array mapping attribute names to values.

content() public method

Return the textual content of a specified node.
public content ( mixed $node ) : string
$node mixed A node object from a previous call to $this->evalXPath().
return string $content The content of this node.

evalXPath() public method

Evaluate an XPath expression and return the resulting node list. This should be overridden by subclasses.
public evalXPath ( string $xpath, mixed $node = null ) : array
$xpath string The XPath expression to be evaluated.
$node mixed A node object resulting from a previous evalXPath call. This node, if specified, provides the context for the evaluation of this xpath expression.
return array $node_list An array of matching opaque node objects to be used with other methods of this parser class.

init() public method

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 $namespace_map ) : boolean
$xml_string string A string of XML to be parsed.
$namespace_map array An array of ($ns_name => $ns_uri) to be registered with the XML parser. May be empty.
return boolean $result True if the initialization and namespace registration(s) succeeded; false otherwise.

registerNamespace() public method

Register a namespace with the XML parser. This should be overridden by subclasses.
public registerNamespace ( string $prefix, string $uri ) : boolean
$prefix string The namespace prefix to appear in XML tag names.
$uri string The namespace URI to be used to identify the namespace in the XML.
return boolean $result True if the registration succeeded; false otherwise.

setXML() public method

Set this parser object's XML payload. This should be overridden by subclasses.
public setXML ( string $xml_string ) : boolean
$xml_string string The XML string to pass to this object's XML parser.
return boolean $result True if the initialization succeeded; false otherwise.