# tasks/ext/XmlPropertyTask.php

Task for setting properties from an XML file in buildfiles.

Author
  Jonathan Bond-Caron
Link
  http://ant.apache.org/manual/CoreTasks/xmlproperty.html
Package
  phing.tasks.ext
Since
  2.4.0
Version
  $Revision: 1110 $

## \XmlPropertyTask
jump to top

Package: phing\tasks\ext

Task for setting properties from an XML file in buildfiles.

Parent(s)
  \PropertyTask < \Task < \ProjectComponent
Author
  Jonathan Bond-Caron
Link
  http://ant.apache.org/manual/CoreTasks/xmlproperty.html
Since
  2.4.0
Version
  $Revision: 1110 $

### Properties

`$_collapseAttr= 'false'`
Default value `false` Details

Type
  n/a

`$_delimiter= '',''`
Default value`','`Details

Type
  n/a

`$_keepRoot= 'true'`
Default value `true` Details

Type
  n/a

### Methods

`_addNode( \SimpleXMLElement $node, array $path, \Properties $prop ) : void`

Adds an XML node

Parameters

Name | Type | Description
--- | --- | ---
$node | \SimpleXMLElement |
$path | array | Path to this node
$prop | \Properties | Properties will be added as they are found (by reference here)

`_getProperties( string $filePath ) : \Properties`

Parses an XML file and returns properties

Parameters

Name | Type | Description
--- | --- | ---
$filePath | string |

Returns

Type | Description
--- | ---
\Properties |

`addProperties( ) : void`

`addProperty( ) : void`

`addText( ) : void`

`getCollapseAttributes( ) : bool`

Returns

Type | Description
--- | ---
bool |

`getDelimiter( ) : string`

Returns

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

`getDescription( ) : void`

`getEnvironment( ) : void`

`getFallback( ) : void`

`getFile( ) : void`

Get the PhingFile that is being used as property source.

`getKeepRoot( ) : bool`

Returns

Type | Description
--- | ---
bool |

`getLocation( ) : void`

`getName( ) : void`

`getOverride( ) : void`

`getOwningTarget( ) : void`

`getPrefix( ) : string`

Returns

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

Details

Since
  2.0

`getProject( ) : void`

`getRefid( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`getUserProperty( ) : void`

`getValue( ) : void`

`init( ) : void`

`loadEnvironment( ) : void`

`loadFile( \PhingFile $file ) : void`

load properties from an XML file.

Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`log( ) : void`

`main( ) : void`

set the property in the project to the value.

if the task was give a file or env attribute here is where it is loaded

`maybeConfigure( ) : void`

`parsePropertyString( ) : void`

`perform( ) : void`

`resolveAllProperties( ) : void`

`setCollapseAttributes( bool $yesNo ) : void`

Treat attributes as nested elements.

Parameters

Name | Type | Description
--- | --- | ---
$yesNo | bool |

`setDelimiter( string $d ) : void`

Delimiter for splitting multiple values.

Parameters

Name | Type | Description
--- | --- | ---
$d | string |

`setDescription( ) : void`

`setEnvironment( ) : void`

`setFallback( ) : void`

`setFile( $file ) : void`

Set a file to use as the source for properties.

Parameters

Name | Type | Description
--- | --- | ---
$file |  |

`setKeepRoot( bool $yesNo ) : void`

Keep the xml root tag as the first value in the property name

Parameters

Name | Type | Description
--- | --- | ---
$yesNo | bool |

`setLocation( ) : void`

`setName( ) : void`

`setOverride( ) : void`

`setOwningTarget( ) : void`

`setPrefix( string $prefix ) : void`

Prefix to apply to properties loaded using `file`.

A "." is appended to the prefix if not specified.

Parameters

Name | Type | Description
--- | --- | ---
$prefix | string | prefix string

Details

Since
  2.0

`setProject( ) : void`

`setRefid( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

`setUserProperty( ) : void`

`setValue( ) : void`

`toString( ) : void`

Documentation was generated by DocBlox 0.17.1.