The target handler class.

This class handles the occurance of a tag and it's possible nested tags (datatypes and tasks).

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

### Methods

## Constructs a new TargetHandler

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

The constructor must be called by all derived classes.

### Parameters

#### $parser

`object`

the ExpatParser object

#### $parentHandler

`object`

the parent handler that invoked this handler

#### $configurator

`object`

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

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

    init(string $tag, array $attrs)

<

p> This includes:

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

### Parameters

#### $tag

`string`

the tag that comes in

#### $attrs

`array`

attributes the tag carries

### Exceptions

`\ExpatParseException` | if attributes are incomplete or invalid

## Checks for nested tags within the current one.

    startElement(string $name, array $attrs)

Creates and calls handlers respectively.

### Parameters

#### $name

`string`

the tag that comes in

#### $attrs

`array`

attributes the tag carries

## Checks if this target has dependencies and/or nested tasks.

    finished()

If the target has neither, show a warning.

### Properties

##

    $parentHandler

Inherited

inherited_from | \AbstractHandler::$$parentHandler

##

    $parser

Inherited

inherited_from | \AbstractHandler::$$parser

##

    $configurator : \ProjectConfigurator

##

    $target : object