# RootHandler

Extends \AbstractHandler

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 andi@binarycloud.com
copyright | 2001,2002 THYRELL. All rights reserved
version | $Id: 66af966f9e0e09732e373a68652475d3b63db419 $
package | phing.parser

### Methods

## Constructs a SAX handler parser.

    __construct( $parser,  $parentHandler)

inherited

The constructor must be called by all derived classes.

### Arguments

#### $parser

``

#### $parentHandler

``

## Invoked by occurance of #PCDATA.

    characters( $data)

inherited

throws |
exception | ExpatParserException if there is no CDATA but method was called

### Arguments

#### $data

``

## Gets invoked when a XML element ends.

    endElement( $name)

inherited

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

### Arguments

#### $name

``

## Gets invoked when element closes method.

    finished()

inherited

## 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.

throws | if the first element within our build file is not the >project< element

### Arguments

#### $tag

`string`

The xml tagname

#### $attrs

`array`

The attributes of the tag

### Properties

## The phing project configurator object

    configurator :

### Type(s)

``

## context

    context : \PhingXMLContext

var |

### Type(s)

`\PhingXMLContext`

## parentHandler

    parentHandler :

inherited

### Type(s)

``

## parser

    parser :

inherited

### Type(s)

``