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

\ProjectConfigurator
$configurator= ''
The phing project configurator object
- Type
- \ProjectConfigurator

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

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

__construct(
object $parser, object $parentHandler, object $configurator
)
:
voidConstructs a new TargetHandler
The constructor must be called by all derived classes.
| Name | Type | Description |
|---|---|---|
| $parser | object | the ExpatParser object |
| $parentHandler | object | the parent handler that invoked this handler |
| $configurator | object | 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 |

finished(
)
:
voidChecks if this target has dependencies and/or nested tasks.
If the target has neither, show a warning.

init(
string $tag, array $attrs
)
:
voidExecutes initialization actions required to setup the data structures related to the tag.
<
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)
| 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
)
:
voidChecks 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 |