Uses regular expressions to perform filename transformations.

author | Andreas Aderhold
author | Hans Lellelid
version | $Id$
package | phing.mappers

### Methods

## __construct()

    __construct()

## The mapper implementation.

    main(mixed $sourceFileName) : array

### Parameters

#### $sourceFileName

`mixed`

The data the mapper works on.

### Returns

`array`The data after the mapper has been applied; must be in array format (for some reason).

## Sets the &quot;from&quot; pattern.

    setFrom(string $from) : void

Required.

### Parameters

#### $from

`string`

On what this mapper should work

## Sets the &quot;to&quot; pattern.

    setTo(string $to) : void

Required.

### Parameters

#### $to

`string`

To what this mapper should convert the from string

## Replace all backreferences in the to pattern with the matched groups.

    replaceReferences(string $source)

groups of the source.

### Parameters

#### $source

`string`

The source filename.

### Properties

##

    $reg : \Regexp

##

    $to : string