# ElementHandler

Extends \AbstractHandler

The generic element handler class.

This class handles the occurance of runtime registered tags like datatypes (fileset, patternset, etc) and it's possible nested tags. It introspects the implementation of the class and sets up the data structures.

author | Michiel Rook mrook@php.net
copyright | 2001,2002 THYRELL. All rights reserved
version | $Id: 76fe088bf743c9690c81870b92c318c0fe4f38d9 $
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

## Executes initialization actions required to setup the data structures related to the tag.

    init( $propType,  $attrs)

This includes:

- creation of the nested element
- calling the setters for attributes
- adding the element to the container object
- adding a reference to the element (if id attribute is given)

throws | if the setup process fails

### Arguments

#### $propType

``

#### $attrs

``

## Checks for nested tags within the current one. Creates and calls handlers respectively.

    startElement( $name,  $attrs)

### Arguments

#### $name

``

#### $attrs

``

### Properties

## Reference to the parent object that represents the parent tag of this nested element

    parent : object

var |

### Type(s)

`object`

## Reference to the child object that represents the child tag of this nested element

    child : object

var |

### Type(s)

`object`

## Reference to the parent wrapper object

    parentWrapper : object

var |

### Type(s)

`object`

## Reference to the child wrapper object

    childWrapper : object

var |

### Type(s)

`object`

## Reference to the related target object

    target : object

var | the target instance

### Type(s)

`object`

## parentHandler

    parentHandler :

inherited

### Type(s)

``

## parser

    parser :

inherited

### Type(s)

``