parser/TaskHandler.php
The task handler class.
This class handles the occurance of a
- Author
- Andreas Aderhold
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Package
- phing.parser
- Version
- $Id: 3b31bb3e2c1ae122411833c67617e7cebf6967b8 $
\TaskHandler
The task handler class.
This class handles the occurance of a
- Parent(s)
- \AbstractHandler
- Author
- Andreas Aderhold
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Version
- $Id: 3b31bb3e2c1ae122411833c67617e7cebf6967b8 $
Properties


\ProjectConfigurator
$configurator= ''
The phing project configurator object
- 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- Type
- object


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


\RuntimeConfigurable
$parentWrapper= ''
Wrapper for the parent element, if any. The wrapper for this element will be added to this wrapper as a child.
- Type
- \RuntimeConfigurable


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


object
$target= ''
Reference to the target object that contains the currently parsed task
the target instance- Type
- object


\Task
$task= ''
Reference to the task object that represents the currently parsed target.
- Type
- \Task
Methods


__construct(
\AbstractSAXParser $parser, object $parentHandler, \ProjectConfigurator $configurator, \TaskContainer $container
=
null, \RuntimeConfigurable $parentWrapper
=
null, \Target $target
=
null
)
:
void
Constructs a new TaskHandler and sets up everything.
The constructor must be called by all derived classes.
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
)
:
void
Handles character data.
Name | Type | Description |
---|---|---|
$data | string | The CDATA that comes in |


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 |


init(
string $tag, array $attrs
)
:
void
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
Name | Type | Description |
---|---|---|
$tag | string | The tag that comes in |
$attrs | array | Attributes the tag carries |
Exception | Description |
---|---|
\ExpatParseException | if attributes are incomplete or invalid |


startElement(
string $name, array $attrs
)
:
void
Checks for nested tags within the current one. Creates and calls handlers respectively.
Must be overloaded by the child class. Throws an ExpatParseException if there is no handler registered for an element.
Name | Type | Description |
---|---|---|
$name | string | The tag that comes in |
$attrs | array | Attributes the tag carries |