JanRain OpenID Library

Auth_Yadis_dom extends Auth_Yadis_XMLParser
in package

This concrete implementation of Auth_Yadis_XMLParser implements the appropriate API for the 'dom' extension which is typically packaged with PHP 5. This class will be used whenever the 'dom' extension is detected. See the Auth_Yadis_XMLParser class for details on this class's methods.

Table of Contents

$doc  : mixed
$errors  : mixed
$xml  : string
$xpath  : DOMXPath
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.

Properties

$doc

protected mixed $doc = \null

$errors

protected mixed $errors = []

$xml

protected string $xml = ''

$xpath

protected DOMXPath $xpath = \null

Methods

attributes()

Return the attributes of a specified node.

public attributes(DOMNode $node) : array<string|int, mixed>
Parameters
$node : DOMNode
Return values
array<string|int, mixed>

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.

Search results