XRL  2.0.0
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 ()
 

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 44 of file Node.php.

References fpoirotte\XRL\Faults\INTERNAL_ERROR, fpoirotte\XRL\Faults\INVALID_XML_RPC, fpoirotte\XRL\Faults\NOT_WELL_FORMED, and fpoirotte\XRL\Faults\UNSUPPORTED_ENCODING.

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, only those field are valid:
  • name
  • nodeType
  • value
  • isEmptyElement

Definition at line 125 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 has been successfully expanded, or false otherwise.

Definition at line 143 of file Node.php.


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