# classes/phing/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
  $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $

## \DataTypeHandler
jump to top

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

Extends from
  \AbstractHandler
access
  public
author
  Andreas Aderhold
copyright
  © 2001,2002 THYRELL. All rights reserved
package
  phing.parser
version
  $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $

### Properties

`$element= ''`
Details

Type

`$target= ''`
Details

Type

`$wrapper= ''`
Details

Type

### Methods

`__construct( \AbstractSAXParser $parser, \AbstractHandler $parentHandler, \ProjectConfigurator $configurator, \Target $target = null ) :`
Constructs a new DataTypeHandler and sets up everything.
Parameters

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 ) :`
Handles character data.
Parameters

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

Details

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.
Parameters

Name | Type | Description
--- | --- | ---
$name | string | the name of the XML element

`init( string $propType, array $attrs ) :`
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)

Parameters

Name | Type | Description
--- | --- | ---
$propType | string | the tag that comes in
$attrs | array | attributes the tag carries

Details

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

Details

access
  public

Documentation was generated by DocBlox 0.13.1.