parser/RootHandler.php
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
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

$parentHandler= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \AbstractHandler::$$parentHandler

$parser= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \AbstractHandler::$$parser
Methods

__construct(
\AbstractSAXParser $parser, \ProjectConfigurator $configurator
)
:
voidConstructs 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
| Name | Type | Description |
|---|---|---|
| $parser | \AbstractSAXParser | The ExpatParser object. |
| $configurator | \ProjectConfigurator | The ProjectConfigurator object. |

characters(
string $data
)
:
void
| Name | Type | Description |
|---|---|---|
| $data | string | the name of the XML element |
- Access
- public
- Exception
- ExpatParserException if there is no CDATA but method was called

endElement(
string $name
)
:
void
Can be overloaded by the child class. But should not. It hands over control to the parentHandler of this.
| Name | Type | Description |
|---|---|---|
| $name | string | the name of the XML element |

startElement(
string $tag, array $attrs
)
:
voidKick 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.
| Name | Type | Description |
|---|---|---|
| $tag | string | The xml tagname |
| $attrs | array | The attributes of the tag |
| Exception | Description |
|---|---|
| \ExpatParseException | if the first element within our build file is not the >project< element |