parser/RootHandler.php

Show: inherited
Table of Contents

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  
Package
phing.parser  
Version
$Id$  

\RootHandler

Package: phing\parser

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.

Parent(s)
\AbstractHandler
Author
Andreas Aderhold  
Copyright
2001,2002 THYRELL. All rights reserved  
Version
$Id$  

Properties

Propertyprivate  $configurator= ''

The phing project configurator object

Details
Type
n/a
Propertypublic  $parentHandler= 'null'
inheritedInherited from: \AbstractHandler::$$parentHandler
Default valuenullDetails
Type
n/a
Inherited_from
\AbstractHandler::$$parentHandler  
Propertypublic  $parser= 'null'
inheritedInherited from: \AbstractHandler::$$parser
Default valuenullDetails
Type
n/a
Inherited_from
\AbstractHandler::$$parser  

Methods

methodpublic__construct( \AbstractSAXParser $parser, \ProjectConfigurator $configurator ) : void

Constructs a new RootHandler

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
Name Type Description
$parser \AbstractSAXParser

The ExpatParser object.

$configurator \ProjectConfigurator

The ProjectConfigurator object.

methodpubliccharacters( string $data ) : void
inherited

Invoked by occurance of #PCDATA.

Inherited from: \AbstractHandler::characters()
Parameters
Name Type Description
$data string

the name of the XML element

Details
Access
public  
Exception
ExpatParserException if there is no CDATA but method was called  
methodpublicendElement( string $name ) : void
inherited

Gets invoked when a XML element ends.

Inherited from: \AbstractHandler::endElement()

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

Parameters
Name Type Description
$name string

the name of the XML element

methodprotectedfinished( ) : void
inherited

Gets invoked when element closes method.

Inherited from: \AbstractHandler::finished()
methodpublicstartElement( string $tag, array $attrs ) : void

Kick off a custom action for a start element tag.

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
Name Type Description
$tag string

The xml tagname

$attrs array

The attributes of the tag

Throws
Exception Description
\ExpatParseException if the first element within our build file is not the >project< element
Documentation was generated by DocBlox 0.18.1.