# classes/phing/parser/TaskHandler.php

The task handler class.

This class handles the occurance of a <task> tag and it's possible nested tags (datatypes and tasks) that may be unknown off bat and are initialized on the fly.

author
  Andreas Aderhold
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.parser
version
  $Revision: 912 $

## \TaskHandler
jump to top

The task handler class.

This class handles the occurance of a <task> tag and it's possible nested tags (datatypes and tasks) that may be unknown off bat and are initialized on the fly.

Extends from
  \AbstractHandler
author
  Andreas Aderhold
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.parser
version
  $Revision: 912 $

### Properties

`\ProjectConfigurator $configurator= ''`

The phing project configurator object

Details

Type
  \ProjectConfigurator

`object $container= ''`

Reference to the target object that represents the currently parsed target. This must not necessarily be a target, hence extra variable.

the target instance
Details

Type
  object

`\RuntimeConfigurable $parentWrapper= ''`

Wrapper for the parent element, if any. The wrapper for this element will be added to this wrapper as a child.

Details

Type
  \RuntimeConfigurable

`object $target= ''`

Reference to the target object that contains the currently parsed task

the target instance
Details

Type
  object

`\Task $task= ''`

Reference to the task object that represents the currently parsed target.

Details

Type
  \Task

`$wrapper= ''`

Wrapper for this element which takes care of actually configuring the element, if this element is contained within a target.

Otherwise the configuration is performed with the configure method.

Details

Type
see
  \ProjectHelper::configure(Object,AttributeList,Project)

### Methods

`__construct( \AbstractSAXParser $parser, object $parentHandler, \ProjectConfigurator $configurator, \TaskContainer $container = null, \RuntimeConfigurable $parentWrapper = null, \Target $target = null ) :`
Constructs a new TaskHandler and sets up everything.
Parameters

Name | Type | Description
--- | --- | ---
$parser | \AbstractSAXParser | The ExpatParser object
$parentHandler | object | The parent handler that invoked this handler
$configurator | \ProjectConfigurator |
$container | \TaskContainer | The container object this task is contained in (null for top-level tasks).
$parentWrapper | \RuntimeConfigurable | Wrapper for the parent element, if any.
$target | \Target | The target object this task is contained in (null for top-level tasks).

`characters( string $data ) :`
Handles character data.
Parameters

Name | Type | Description
--- | --- | ---
$data | string | The CDATA that comes in

`finished( ) :`
Executes the task at once if it's directly beneath the <project> tag.
`init( string $tag, array $attrs ) :`
Executes initialization actions required to setup the data structures related to the tag.

<

p> This includes:

- creation of the task object
- calling the setters for attributes
- adding the task to the container object
- adding a reference to the task (if id attribute is given)
- executing the task if the container is the <project> element

Parameters

Name | Type | Description
--- | --- | ---
$tag | string | The tag that comes in
$attrs | array | Attributes the tag carries

Details

throws
  if attributes are incomplete or invalid

`startElement( string $name, array $attrs ) :`
Checks for nested tags within the current one. Creates and calls handlers respectively.
Parameters

Name | Type | Description
--- | --- | ---
$name | string | The tag that comes in
$attrs | array | Attributes the tag carries

Documentation was generated by DocBlox 0.13.1.