# classes/phing/UnknownElement.php

Wrapper class that holds all information necessary to create a task that did not exist when Phing started.

This has something to do with phing encountering an task XML element it is not aware of at start time. This is a situation where special steps need to be taken so that the element is then known.

author
  Andreas Aderhold
author
  Hans Lellelid
package
  phing
version
  $Revision: 552 $

## \UnknownElement
jump to top

Wrapper class that holds all information necessary to create a task that did not exist when Phing started.

This has something to do with phing encountering an task XML element it is not aware of at start time. This is a situation where special steps need to be taken so that the element is then known.

Extends from
  \Task
author
  Andreas Aderhold
author
  Hans Lellelid
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing
version
  $Revision: 552 $

### Properties

`$children= 'array'`
Default value `array` Details

Type

`$elementName= ''`
Details

Type

`$realThing= ''`
Details

Type

### Methods

`__construct( string $elementName ) :`
Constructs a UnknownElement object
Parameters

Name | Type | Description
--- | --- | ---
$elementName | string | The XML element name that is unknown

Details

access
  public

`addChild( object $child ) :`
Add a child element to the unknown element
Parameters

Name | Type | Description
--- | --- | ---
$child | object | The object representing the child element

`getTag( ) : string`
Return the XML element name that this `UnnownElement` handles.
Returns

Type | Description
--- | ---
string |

`getTaskName( ) :`
Get the name of the task to use in logging messages.

@return string The task's name

`handleChildren( object $parent, $parentWrapper ) :`
Handle child elemets of the unknown element, if any.

@param ProjectComponent The parent object the unkown element belongs to

Parameters

Name | Type | Description
--- | --- | ---
$parent | object | The parent wrapper object
$parentWrapper |  |

`main( ) :`
Called when the real task has been configured for the first time.
Details

throws
  if the task can not be created

`makeObject( \UnknownElement $ue, \RuntimeConfigurable $w ) : object`
Creates a named task or data type. If the real object is a task, it is configured up to the init() stage.
Parameters

Name | Type | Description
--- | --- | ---
$ue | \UnknownElement | The unknown element to create the real object for. Must not be `null`.
$w | \RuntimeConfigurable | Ignored in this implementation.

Returns

Type | Description
--- | ---
object |

`makeTask( \UnknownElement $ue, \RuntimeConfigurable $w, boolean $onTopLevel = false ) : \Task`
Create a named task and configure it up to the init() stage.
Parameters

Name | Type | Description
--- | --- | ---
$ue | \UnknownElement | The unknwon element to create a task from
$w | \RuntimeConfigurable | The wrapper object
$onTopLevel | boolean | Whether to treat this task as if it is top-level.

Returns

Type | Description
--- | ---
\Task |

`maybeConfigure( ) :`
Tries to configure the unknown element
Details

throws
  if the element can not be configured

Documentation was generated by DocBlox 0.13.1.