parser/DataTypeHandler.php
Configures a Project (complete with Targets and Tasks) based on a XML build file.
<
p> Design/ZE2 migration note: If PHP would support nested classes. All the phing/parser/*Filter classes would be nested within this class
- Access
- public
- Author
- Andreas Aderhold
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Package
- phing.parser
- Version
- $Id$
\DataTypeHandler
Configures a Project (complete with Targets and Tasks) based on a XML build file.
<
p> Design/ZE2 migration note: If PHP would support nested classes. All the phing/parser/*Filter classes would be nested within this class
- Parent(s)
- \AbstractHandler
- Access
- public
- Author
- Andreas Aderhold
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Version
- $Id$
Properties


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


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


__construct(
\AbstractSAXParser $parser, \AbstractHandler $parentHandler, \ProjectConfigurator $configurator, \Target $target
=
null
)
:
void
Constructs a new DataTypeHandler and sets up everything.
The constructor must be called by all derived classes.
Name | Type | Description |
---|---|---|
$parser | \AbstractSAXParser | The XML parser (default: ExpatParser) |
$parentHandler | \AbstractHandler | The parent handler that invoked this handler. |
$configurator | \ProjectConfigurator | The ProjectConfigurator object |
$target | \Target | The target object this datatype is contained in (null for top-level datatypes). |


characters(
string $data
)
:
void
Handles character data.
Name | Type | Description |
---|---|---|
$data | string | the CDATA that comes in |
- Access
- public


endElement(
string $name
)
:
void
Overrides endElement for data types. Tells the type handler that processing the element had been finished so handlers know they can perform actions that need to be based on the data contained within the element.
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 $propType, array $attrs
)
:
void
Executes initialization actions required to setup the data structures related to the tag.
<
p> This includes:
- creation of the datatype object
- calling the setters for attributes
- adding the type to the target object if any
- adding a reference to the task (if id attribute is given)
Name | Type | Description |
---|---|---|
$propType | string | the tag that comes in |
$attrs | array | attributes the tag carries |
Exception | Description |
---|---|
\ExpatParseException | if attributes are incomplete or invalid |
- Access
- public


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 |
- Access
- public