Root filter class for a phing buildfile.

The root filter is called by the parser first. This is where the phing specific parsing starts. RootHandler decides what to do next.

author Andreas Aderhold
copyright 2001,2002 THYRELL. All rights reserved
version $Id$
package phing.parser

 Methods

Constructs a new RootHandler

__construct(\AbstractSAXParser $parser, \ProjectConfigurator $configurator) 

The root filter is required so the parser knows what to do. It's called by the ExpatParser that is instatiated in ProjectConfigurator.

It recieves the expat parse object ref and a reference to the configurator

Parameters

$parser

\AbstractSAXParser

The ExpatParser object.

$configurator

\ProjectConfigurator

The ProjectConfigurator object.

Invoked by occurance of #PCDATA.

characters(string $data) 
Inherited
exception ExpatParserException if there is no CDATA but method was called
access public
inherited_from \AbstractHandler::characters()

Parameters

$data

string

the name of the XML element

Gets invoked when a XML element ends.

endElement(string $name) 
Inherited

Can be overloaded by the child class. But should not. It hands over control to the parentHandler of this.

inherited_from \AbstractHandler::endElement()

Parameters

$name

string

the name of the XML element

Kick off a custom action for a start element tag.

startElement(string $tag, array $attrs) 

The root element of our buildfile is the <project> element. The root filter handles this element if it occurs, creates ProjectHandler to handle any nested tags & attributes of the <project> tag, and calls init.

Parameters

$tag

string

The xml tagname

$attrs

array

The attributes of the tag

Exceptions

\ExpatParseException if the first element within our build file is not the >project< element

Gets invoked when element closes method.

finished() 
Inherited
inherited_from \AbstractHandler::finished()

 Properties

 

$parentHandler 
Inherited
inherited_from \AbstractHandler::$$parentHandler
 

$parser 
Inherited
inherited_from \AbstractHandler::$$parser
 

$configurator