XRL  3.1.1
Simple XML-RPC Library (both client and server)
fpoirotte\XRL\Node Class Reference

An XML node as read from an XML reader. More...

Public Member Functions

 __construct (\XMLReader $reader, $validate, $subtrees)
 
 __get ($field)
 
 emptyNodeExpansionWorked ()
 

Public Attributes

const XML_ERR_DOCUMENT_EMPTY = 4
 
const XML_ERR_DOCUMENT_END = 5
 
const XML_ERR_INTERNAL_ERROR = 1
 Error codes from http://www.xmlsoft.org/html/libxml-xmlerror.html.
 
const XML_ERR_INVALID_CHAR = 9
 
const XML_ERR_NO_MEMORY = 2
 
const XML_ERR_UNKNOWN_ENCODING = 31
 
const XML_ERR_UNSUPPORTED_ENCODING = 32
 

Protected Attributes

 $properties
 Fields that make up this node.
 

Detailed Description

An XML node as read from an XML reader.

This class is used to memorize the last XML node that was read from an XML reader, so as to push the node back in case it could not be processed by an XML-RPC decoder.

Authors
François Poirotte click.nosp@m.y@er.nosp@m.ebot..nosp@m.net

Definition at line 25 of file Node.php.

Constructor & Destructor Documentation

fpoirotte\XRL\Node::__construct ( \XMLReader  $reader,
  $validate,
  $subtrees 
)

Create a new XML node.

Parameters
XMLReader$readerXML reader object that will be used to create this node.
bool$validateWhether an exception should be raised (true) or not (false) if the current node is not valid.
bool$subtreesWhether to explore subtrees (true) or not (false).

Definition at line 53 of file Node.php.

Member Function Documentation

fpoirotte\XRL\Node::__get (   $field)

Magic method that returns one of the fields of this node.

Parameters
string$fieldThe name of the field to return.
Exceptions
UnexpectedValueExceptionRaised when the given field does not exist.
Note
Currently, the following fields are valid:
  • isEmptyElement
  • localName
  • name (= "{namespaceURI}localName" or just "localName")
  • namespaceURI
  • nodeType
  • value

Definition at line 153 of file Node.php.

fpoirotte\XRL\Node::emptyNodeExpansionWorked ( )

Try to expand the current node if it's an empty one and return whether the expansion worked or not.

Return values
booltrue if this node was an empty one and it was successfully expanded, false otherwise.

Definition at line 170 of file Node.php.


The documentation for this class was generated from the following file: