phing-parser

# Class: AbstractHandler Source Location: /parser/AbstractHandler.php
### Class Overview
This is an abstract class all SAX handler classes must extend #### Author(s): Andreas Aderhold <andi@binarycloud.com> #### Version: $Revision: 526 $ #### Copyright: © 2001,2002 THYRELL. All rights reserved | ### Variables $parentHandler $parser | ### Methods __construct characters endElement finished startElement
### Child classes: NestedElementHandler The nested element handler class. TargetHandler The target handler class. DataTypeHandler Configures a Project (complete with Targets and Tasks) based on a XML build file. TaskHandler The task handler class. ProjectHandler Handler class for the <project> XML element This class handles all elements under the <project> element. RootHandler Root filter class for a phing buildfile.
### Class Details [line 33] This is an abstract class all SAX handler classes must extend #### Tags:
author: | Andreas Aderhold <andi@binarycloud.com>
version: | $Revision: 526 $
copyright: | © 2001,2002 THYRELL. All rights reserved
abstract: |
[ Top ] ### Class Variables #### $parentHandler = null [line 35] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $parser = null [line 36] #### Tags:
access: | public
Type: | mixed
[ Top ] ### Class Methods ### constructor __construct [line 46]
`AbstractHandler __construct( object the $parser, object the $parentHandler)`
Constructs a SAX handler parser. The constructor must be called by all derived classes. #### Tags:
access: | protected
Overridden in child classes as: NestedElementHandler::__construct() Constructs a new NestedElement handler and sets up everything. TargetHandler::__construct() Constructs a new TargetHandler DataTypeHandler::__construct() Constructs a new DataTypeHandler and sets up everything. TaskHandler::__construct() Constructs a new TaskHandler and sets up everything. ProjectHandler::__construct() Constructs a new ProjectHandler RootHandler::__construct() Constructs a new RootHandler #### Parameters:
object the | $parser | parser object
object the | $parentHandler | parent handler of this handler
[ Top ] ### method characters [line 92]
`void characters( string $data)`
Invoked by occurance of #PCDATA. #### Tags:
exception: | ExpatParserException if there is no CDATA but method was called
access: | public
Overridden in child classes as: NestedElementHandler::characters() Handles character data. DataTypeHandler::characters() Handles character data. TaskHandler::characters() Handles character data. #### Parameters:
string | $data | the name of the XML element
[ Top ] ### method endElement [line 79]
`void endElement( string $name)`
Gets invoked when a XML element ends. Can be overloaded by the child class. But should not. It hands over control to the parentHandler of this. #### Tags:
access: | public
Overridden in child classes as: DataTypeHandler::endElement() Overrides endElement for data types. Tells the type handler that processing the element had been finished so handlers know they can perform actions that need to be based on the data contained within the element. #### Parameters:
string | $name | the name of the XML element
[ Top ] ### method finished [line 69]
`void finished( )`
Gets invoked when element closes method. #### Tags:
access: | protected
Overridden in child classes as: TaskHandler::finished() Executes the task at once if it's directly beneath the <project> tag. [ Top ] ### method startElement [line 61]
`void startElement( string $name, array $attribs)`
Gets invoked when a XML open tag occurs Must be overloaded by the child class. Throws an ExpatParseException if there is no handler registered for an element. #### Tags:
access: | public
Overridden in child classes as: NestedElementHandler::startElement() Checks for nested tags within the current one. Creates and calls handlers respectively. TargetHandler::startElement() Checks for nested tags within the current one. Creates and calls handlers respectively. DataTypeHandler::startElement() Checks for nested tags within the current one. Creates and calls handlers respectively. TaskHandler::startElement() Checks for nested tags within the current one. Creates and calls handlers respectively. ProjectHandler::startElement() Handles start elements within the <project> tag by creating and calling the required handlers for the detected element. RootHandler::startElement() Kick off a custom action for a start element tag. #### Parameters:
string | $name | the name of the XML element
array | $attribs | the attributes of the XML element
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:50:15 +0200 by phpDocumentor 1.4.3