# parser/NestedElementHandler.php

## \NestedElementHandler
jump to top

Package: phing\parser

The nested element handler class.

This class handles the occurance of runtime registered tags like datatypes (fileset, patternset, etc) and it's possible nested tags. It introspects the implementation of the class and sets up the data structures.

Parent(s)
  \AbstractHandler
Access
  public
Author
  Andreas Aderhold
Copyright
  © 2001,2002 THYRELL. All rights reserved
Version
  $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $

### Properties

`object $child= ''`

Reference to the child object that represents the child tag of this nested element

Details

Type
  object

`$childWrapper= ''`

Reference to the child wrapper object

@var object

Details

Type

`object $parent= ''`

Reference to the parent object that represents the parent tag of this nested element

Details

Type
  object

`$parentHandler= 'null'`
inherited Inherited from: \AbstractHandler::$parentHandler
Default value `null` Details

Type
Inherited_from
  \AbstractHandler::$parentHandler

`$parentWrapper= ''`

Reference to the parent wrapper object

@var object

Details

Type

`$parser= 'null'`
inherited Inherited from: \AbstractHandler::$parser
Default value `null` Details

Type
Inherited_from
  \AbstractHandler::$parser

`$target= ''`

Reference to the related target object

@var object the target instance

Details

Type

### Methods

`__construct( object $parser, object $parentHandler, object $configurator, object $parent, object $parentWrapper, $target ) : void`

Constructs a new NestedElement handler and sets up everything.

@param object the ExpatParser object

Parameters

Name | Type | Description
--- | --- | ---
$parser | object | the parent handler that invoked this handler
$parentHandler | object | the ProjectConfigurator object
$configurator | object | the parent object this element is contained in
$parent | object | the parent wrapper object
$parentWrapper | object | the target object this task is contained in
$target |  |

Details

Access
  public

`characters( string $data ) : void`

Handles character data.

Parameters

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

Throws

Exception | Description
--- | ---
\ExpatParseException | if the CDATA could not be set-up properly

Details

Access
  public

`endElement( string $name ) : void`
inherited

Gets invoked when a XML element ends.

Inherited from: \AbstractHandler::endElement()

Can be overloaded by the child class. But should not. It hands over control to the parentHandler of this.

Parameters

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

`finished( ) : void`
inherited

Gets invoked when element closes method.

Inherited from: \AbstractHandler::finished()
`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 nested element
- calling the setters for attributes
- adding the element to the container object
- adding a reference to the element (if id attribute is given)

Parameters

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

Throws

Exception | Description
--- | ---
\ExpatParseException | if the setup process fails

Details

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.

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