mappers/RegexpMapper.php

Show: inherited
Table of Contents

\RegexpMapper

Package: phing\mappers

Uses regular expressions to perform filename transformations.

Implements
\FileNameMapper
Author
Andreas Aderhold  
Author
Hans Lellelid  
Version
$Revision: 526 $  

Properties

Propertyprivate\Regexp  $reg= ''

The Regexp engine.

Details
Type
\Regexp
Propertyprivatestring  $to= ''

Details
Type
string

Methods

methodpublic__construct( ) : void

methodpublicmain( mixed $sourceFileName ) : array

The mapper implementation.

Parameters
Name Type Description
$sourceFileName mixed

The data the mapper works on.

Returns
Type Description
array The data after the mapper has been applied; must be in array format (for some reason).
methodprivatereplaceReferences( string $source ) : void

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

groups of the source.

Parameters
Name Type Description
$source string

The source filename.

methodpublicsetFrom( string $from ) : void

Sets the "from" pattern. Required.

Parameters
Name Type Description
$from string

On what this mapper should work

methodpublicsetTo( string $to ) : void

Sets the "to" pattern. Required.

Parameters
Name Type Description
$to string

To what this mapper should convert the from string

Documentation was generated by DocBlox 0.17.1.