phing-parser

# Class: AbstractSAXParser Source Location: /parser/AbstractSAXParser.php
### Class Overview
The abstract SAX parser class. #### Author(s): Hans Lellelid <hans@xmpl.org> Andreas Aderhold <andi@binarycloud.com> #### Version: $Revision: 552 $ #### Copyright: � 2001,2002 THYRELL. All rights reserved | ### Variables $handler | ### Methods __construct characters endElement parse parserSetOption setHandler startElement
### Child classes: ExpatParser This class is a wrapper for the PHP's internal expat parser.
### Class Details [line 34] The abstract SAX parser class. This class represents a SAX parser. It is a abstract calss that must be implemented by the real parser that must extend this class #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
author: | Andreas Aderhold <andi@binarycloud.com>
version: | $Revision: 552 $
copyright: | � 2001,2002 THYRELL. All rights reserved
abstract: |
[ Top ] ### Class Variables #### $handler = [line 37] The AbstractHandler object. #### Tags:
access: | protected
Type: | mixed
[ Top ] ### Class Methods ### constructor __construct [line 42]
`AbstractSAXParser __construct( )`
Constructs a SAX parser Overridden in child classes as: ExpatParser::__construct() Constructs a new ExpatParser object. [ Top ] ### method characters [line 107]
`void characters( resource $parser, string $data)`
Method that gets invoked when the parser runs over CDATA. This method is called by PHP's internal parser functions and registered in the actual parser implementation. It gives control to the current active handler object by calling the characters() method. That processes the given CDATA. #### Tags:
throws: | Exception - Exceptions may be thrown by the Handler
#### Parameters:
resource | $parser | php's internal parser handle.
string | $data | the CDATA
[ Top ] ### method endElement [line 90]
`void endElement( object the $parser, string $name)`
Method that gets invoked when the parser runs over a XML close element. This method is called by PHP's internal parser funcitons and registered in the actual parser implementation. It gives control to the current active handler object by calling the endElement() method. #### Tags:
throws: | Exception - Exceptions may be thrown by the Handler
#### Parameters:
object the | $parser | php's internal parser handle
string | $name | the closing tag name
[ Top ] ### method parse [line 115]
`void parse( )`
Entrypoint for parser. This method needs to be implemented by the child classt that utilizes the concrete parser #### Tags:
abstract: |
Overridden in child classes as: ExpatParser::parse() Starts the parsing process. [ Top ] ### method parserSetOption [line 48]
`void parserSetOption( $opt, $val)`
Sets options for PHP interal parser. Must be implemented by the parser class if it should be used. #### Tags:
abstract: |
Overridden in child classes as: ExpatParser::parserSetOption() Override PHP's parser default settings, created in the constructor. #### Parameters:
| $opt |
| $val |
[ Top ] ### method setHandler [line 56]
`void setHandler( AbstractHandler $obj)`
Sets the current element handler object for this parser. Usually this is an object using extending "AbstractHandler". #### Parameters:
AbstractHandler | $obj | The handler object.
[ Top ] ### method startElement [line 73]
`void startElement( object the $parser, string $name, array $attribs)`
Method that gets invoked when the parser runs over a XML start element. This method is called by PHP's internal parser functions and registered in the actual parser implementation. It gives control to the current active handler object by calling the startElement() method. #### Tags:
throws: | Exception - Exceptions may be thrown by the Handler
#### Parameters:
object the | $parser | php's internal parser handle
string | $name | the open tag name
array | $attribs | the tag's attributes if any
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:50:16 +0200 by phpDocumentor 1.4.3