RegexpMapper

Implements \FileNameMapper

Uses regular expressions to perform filename transformations.

author

Andreas Aderhold andi@binarycloud.com

author

Hans Lellelid hans@velum.net

version

$Id: 14be50f68cae9f142747714020b21d5c4816bc5f $

package

phing.mappers

Methods

__construct

__construct() 

The mapper implementation.

main( $sourceFileName) : array

Arguments

$sourceFileName

Response

array

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

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

replaceReferences(string $source) 

groups of the source.

Arguments

$source

string

The source filename.

Gets the matched group from the Regexp engine.

replaceReferencesCallback(array $matches) 

Arguments

$matches

array

Matched elements.

Sets the "from" pattern. Required.

setFrom( $from) : void

Arguments

$from

Sets the "to" pattern. Required.

setTo( $to) : void

Arguments

$to

Properties

to

to : string
var

Type(s)

string

The Regexp engine.

reg : \Regexp
var

Type(s)

\Regexp