SimpleTestXmlParser Class Reference

List of all members.


Public Member Functions

 SimpleTestXmlParser (&$listener)
 parse ($chunk)
_createParser ()
 _pushNestingTag ($nested)
_getCurrentNestingTag ()
 _popNestingTag ()
 _startElement ($expat, $tag, $attributes)
 _endElement ($expat, $tag)
 _addContent ($expat, $text)
 _default ($expat, $default)

Public Attributes

 $_listener
 $_expat
 $_tag_stack
 $_in_content_tag
 $_content
 $_attributes

Private Member Functions

 _isLeaf ($tag)


Detailed Description

Definition at line 468 of file xml.php.


Member Function Documentation

SimpleTestXmlParser::SimpleTestXmlParser ( &$  listener  ) 

Loads a listener with the SimpleReporter interface.

Parameters:
SimpleReporter $listener Listener of tag events. public

Definition at line 482 of file xml.php.

References _createParser().

Here is the call graph for this function:

SimpleTestXmlParser::parse ( chunk  ) 

Parses a block of XML sending the results to the listener.

Parameters:
string $chunk Block of text to read.
Returns:
boolean True if valid XML. public

Definition at line 498 of file xml.php.

& SimpleTestXmlParser::_createParser (  ) 

Sets up expat as the XML parser.

Returns:
resource Expat handle. protected

Definition at line 512 of file xml.php.

Referenced by SimpleTestXmlParser().

SimpleTestXmlParser::_pushNestingTag ( nested  ) 

Opens a new test nesting level.

Returns:
NestedXmlTag The group, case or method tag to start. private

Definition at line 527 of file xml.php.

Referenced by _startElement().

& SimpleTestXmlParser::_getCurrentNestingTag (  ) 

Accessor for current test structure tag.

Returns:
NestedXmlTag The group, case or method tag being parsed. private

Definition at line 537 of file xml.php.

Referenced by _endElement().

SimpleTestXmlParser::_popNestingTag (  ) 

Ends a nesting tag.

Returns:
NestedXmlTag The group, case or method tag just finished. private

Definition at line 547 of file xml.php.

Referenced by _endElement().

SimpleTestXmlParser::_isLeaf ( tag  )  [private]

Test if tag is a leaf node with only text content.

Parameters:
string $tag XML tag name.
Returns:
True if leaf, false if nesting.

Definition at line 557 of file xml.php.

Referenced by _startElement().

SimpleTestXmlParser::_startElement ( expat,
tag,
attributes 
)

Handler for start of event element.

Parameters:
resource $expat Parser handle.
string $tag Element name.
hash $attributes Name value pairs. Attributes without content are marked as true. protected

Definition at line 571 of file xml.php.

References $attributes, _isLeaf(), and _pushNestingTag().

Here is the call graph for this function:

SimpleTestXmlParser::_endElement ( expat,
tag 
)

End of element event.

Parameters:
resource $expat Parser handle.
string $tag Element name. protected

Definition at line 591 of file xml.php.

References _getCurrentNestingTag(), and _popNestingTag().

Here is the call graph for this function:

SimpleTestXmlParser::_addContent ( expat,
text 
)

Content between start and end elements.

Parameters:
resource $expat Parser handle.
string $text Usually output messages. protected

Definition at line 625 of file xml.php.

SimpleTestXmlParser::_default ( expat,
default 
)

XML and Doctype handler. Discards all such content.

Parameters:
resource $expat Parser handle.
string $default Text of default content. protected

Definition at line 638 of file xml.php.


Member Data Documentation

SimpleTestXmlParser::$_listener

Definition at line 469 of file xml.php.

SimpleTestXmlParser::$_expat

Definition at line 470 of file xml.php.

SimpleTestXmlParser::$_tag_stack

Definition at line 471 of file xml.php.

SimpleTestXmlParser::$_in_content_tag

Definition at line 472 of file xml.php.

SimpleTestXmlParser::$_content

Definition at line 473 of file xml.php.

SimpleTestXmlParser::$_attributes

Definition at line 474 of file xml.php.


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

Generated on Mon Jun 2 15:09:15 2008 for SimpleTest by  1.5.5