classes/phing/IntrospectionHelper.php
\IntrospectionHelper
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
- package
- phing
- version
- $Revision: 930 $
Properties

array
$attributeSetters= 'array'
Holds the attribute setter methods.
string[]arrayDetails- Type
- array

array
$helpers= 'array'
The cache of IntrospectionHelper classes instantiated by getHelper().
IntrospectionHelpers[]arrayDetails- Type
- array

string
$methodAddText= 'null'
The method to add PCDATA stuff.
Method name of the addText (redundant?) method, if class supports it :)nullDetails- Type
- string

array
$nestedCreators= 'array'
Holds methods to create nested elements.
string[]arrayDetails- Type
- array

array
$nestedStorers= 'array'
Holds methods to store configured nested elements.
string[]arrayDetails- Type
- array

array
$slotListeners= 'array'
New idea in phing: any class can register certain keys -- e.g. "task.current_file" -- which can be used in task attributes, if supported. In the build XML these are referred to like this: <regexp pattern="\n" replace="%{task.current_file}"/> In the type/task a listener method must be defined: function setListeningReplace($slot) {}
string[]arrayDetails- Type
- array
Methods

__construct(
$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.
| Name | Type | Description |
|---|---|---|
| $class |

addText(
$project, $element, $text
)
:
| Name | Type | Description |
|---|---|---|
| $project | ||
| $element | ||
| $text |

createElement(
$project, $element, $elementName
)
:
objectValid creators can be in the form createFoo() or addFoo(Bar).
| Name | Type | Description |
|---|---|---|
| $project | ||
| $element | ||
| $elementName |
| Type | Description |
|---|---|
| object |
- throws

getElementName(
\Project $project, object $element
)
:
stringWhen 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.
| Name | Type | Description |
|---|---|---|
| $project | \Project | |
| $element | object | The Task or type element. |
| Type | Description |
|---|---|
| string |

getHelper(
string $class
)
:
| Name | Type | Description |
|---|---|---|
| $class | string | The class to create a Helper for |

getPropertyName(
$methodName, $prefix
)
:
| Name | Type | Description |
|---|---|---|
| $methodName | ||
| $prefix |

setAttribute(
$project, $element, $attributeName, $value
)
:
| Name | Type | Description |
|---|---|---|
| $project | ||
| $element | ||
| $attributeName | ||
| $value |

storeElement(
$project, $element, $child, $elementName
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $project | ||
| $element | ||
| $child | ||
| $elementName |
- throws