Child classes:
Inherited Variables
Inherited Methods
Class Details
This class is designed to provide an easy way to change
the parsing technique used to build results given
as an XML input stream.
This XML stream MUST VALIDATE
the indexresults.xsd !
Tags:
- Package - sevenseas
- Version - $Revision$
- Author - Antoine Angénieux <aangenieux@clever-age.com>
[ Top ]
Class Variables
$m_currentResult =
Inner variable representing the current result being proceeded.
Tags:
- Access - private
Type: SearchResult
Overrides:
[ Top ]
$m_currentTag =
Inner variable representing the current tag being proceeded
Tags:
- Access - private
Type: String
Overrides:
[ Top ]
$m_parser =
XML parser resource
Tags:
- Access - private
Type: resource
Overrides:
[ Top ]
$m_searchResults =
Inner variable representing final SearchResults instance
Tags:
- Access - private
Type: SearchResults
Overrides:
[ Top ]
Class Methods
buildResults
mixed &buildResults ( $xmlInputStream )
This function is the one that does the job ;)
Any subclass should redefine this default method
in order to use a different parsing technique
or a different implementation of SearchResult
Tags:
- Return - Instance of SearchResults or PEAR::Error
Parameters:
- String $xmlInputStream - is the XML stream to parse and to transform into a SearchResult array
[ Top ]
constructor ResultBuilder
void constructor ResultBuilder ( )
Constructor for ResultBuilder
Tags:
- Access - public
Parameters:
[ Top ]
_cdata
void _cdata ( $parser, $cdata )
This method id used to handle chracter datas encounterd
while parsing an XML stream
Tags:
- Access - private
Parameters:
- resource $parser - a resource reference to the XML parser
- String $cdata - representing the cdata encountered
[ Top ]
_parse
void _parse ( &$data )
This methods is used to start the XML parsing
Tags:
- Access - private
Parameters:
- &$data &$data - XML stream to parse
[ Top ]
_parseXMLStream
void _parseXMLStream ( $xmlStream )
This function does the parsing job on the XML Stream and builds
the SearchResult array
Tags:
- Access - private
Parameters:
- String $xmlStream - XML stream to parse
[ Top ]
_tagClose
void _tagClose ( $parser, $tag )
This method id used to handle closing tags during the XML parsing
Tags:
- Access - private
Parameters:
- resource $parser - a resource reference to the XML parser
- String $tag - representing the tag being treated
[ Top ]
_tagOpen
void _tagOpen ( $parser, $tag, $attributes )
This method id used to handle opening tags during the XML parsing
Tags:
- Access - private
Parameters:
- resource $parser - a resource reference to the XML parser
- String $tag - representing the tag being treated
- Array $attributes - containing the current element attributes
[ Top ]