Helper class that collects the methods that a task or nested element holds to set attributes, create nested elements or hold PCDATA elements.

- SMART-UP INLINE DOCS
- POLISH-UP THIS CLASS

author | Andreas Aderhold
author | Hans Lellelid
copyright | 2001,2002 THYRELL. All rights reserved
version | $Id: f33d6ef40fb4caf6fa12b8f1db8977e33c0cd7eb $
package | phing

### Methods

## This function constructs a new introspection helper for a specific class.

    __construct(string $class)

This method loads all methods for the specified class and categorizes them as setters, creators, slot listeners, etc. This way, the setAttribue() doesn't need to perform any introspection -- either the requested attribute setter/creator exists or it does not & a BuildException is thrown.

### Parameters

#### $class

`string`

The classname for this IH.

## Adds PCDATA areas.

    addText(\Project $project, string $element, string $text)

### Parameters

#### $project

`\Project`

#### $element

`string`

#### $text

`string`

## Creates a named nested element.

    createElement(\Project $project, string $element, string $elementName) : object

Valid creators can be in the form createFoo() or addFoo(Bar).

### Parameters

#### $project

`\Project`

#### $element

`string`

#### $elementName

`string`

### Exceptions

`\BuildException` |

### Returns

`object`Returns the nested element.

## Return all attribues supported by the introspected class.

    getAttributes() : string[]

### Returns

`string[]`

## Get the the name for an element.

    getElementName(\Project $project, object $element) : string

When possible the full classnam (phing.tasks.system.PropertyTask) will be returned. If not available (loaded in taskdefs or typedefs) then the XML element name will be returned.

### Parameters

#### $project

`\Project`

#### $element

`object`

The Task or type element.

### Returns

`string`Fully qualified class name of element when possible.

## Factory method for helper objects.

    getHelper(string $class)

Static

### Parameters

#### $class

`string`

The class to create a Helper for

## Return all nested elements supported by the introspected class.

    getNestedElements() : string[]

### Returns

`string[]`

## Extract the name of a property from a method name - subtracting a given prefix.

    getPropertyName(string $methodName, string $prefix) : string

### Parameters

#### $methodName

`string`

#### $prefix

`string`

### Returns

`string`

## Sets the named attribute.

    setAttribute(\Project $project, string $element, string $attributeName, mixed $value)

### Parameters

#### $project

`\Project`

#### $element

`string`

#### $attributeName

`string`

#### $value

`mixed`

## Creates a named nested element.

    storeElement(\Project $project, string $element, string $child, string | null $elementName) : void

### Parameters

#### $project

`\Project`

#### $element

`string`

#### $child

`string`

#### $elementName

`string` `null`

### Exceptions

`\BuildException` |

## Does the introspected class support PCDATA?

    supportsCharacters() : boolean

### Returns

`boolean`

## Prints warning message to screen if -debug was used.

    warn(string $msg)

### Parameters

#### $msg

`string`

### Properties

##

    $attributeSetters : array

##

    $bean : object

access | private

##

    $helpers : array

##

    $methodAddText : string

##

    $nestedCreators : array

##

    $nestedStorers : array

##

    $nestedTypes

##

    $slotListeners : array

"task.current_file" -- which can be used in task attributes, if supported. In the build XML these are referred to like this: In the type/task a listener method must be defined: function setListeningReplace($slot) {}