# classes/phing/tasks/system/ReflexiveTask.php

This task is for using filter chains to make changes to files and overwrite the original files.

This task was created to serve the need for "cleanup" tasks -- e.g. a ReplaceRegexp task or strip task being used to modify files and then overwrite the modified files. In many (most?) cases you probably should just use a copy task to preserve the original source files, but this task supports situations where there is no src vs. build directory, and modifying source files is actually desired.

`<reflexive> <filterchain> <replaceregexp> </replaceregexp> </filterchain> </reflexive>`

author
  Hans Lellelid
package
  phing.tasks.system
version
  $Revision: 552 $

## \ReflexiveTask
jump to top

This task is for using filter chains to make changes to files and overwrite the original files.

This task was created to serve the need for "cleanup" tasks -- e.g. a ReplaceRegexp task or strip task being used to modify files and then overwrite the modified files. In many (most?) cases you probably should just use a copy task to preserve the original source files, but this task supports situations where there is no src vs. build directory, and modifying source files is actually desired.

`<reflexive> <filterchain> <replaceregexp> </replaceregexp> </filterchain> </reflexive>`

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

### Properties

`$file= ''`

Single file to process.

Details

Type

`$filesets= 'array'`

Any filesets that should be processed.

Default value `array` Details

Type

`$filterChains= 'array'`

Any filters to be applied before append happens.

Default value `array` Details

Type

### Methods

`createFileSet( ) :`
Nested creator, adds a set of files (nested fileset attribute).
`createFilterChain( ) : object`
Creates a filterchain
Returns

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

`main( ) :`
Append the file(s).
`setFile( $f ) :`
Alias for setFrom()
Parameters

Name | Type | Description
--- | --- | ---
$f |  |

Documentation was generated by DocBlox 0.13.1.