classes/phing/tasks/ext/ReplaceRegexpTask.php

ReplaceRegExp is a directory based task for replacing the occurrence of a given regular expression with a substitution pattern in a selected file or set of files.

author
Jonathan Bond-Caron
link
http://ant.apache.org/manual/OptionalTasks/replaceregexp.html
package
phing.tasks.system
version
$Id: ReplaceRegexpTask.php 1110 2011-05-23 16:00:43Z mrook $

\ReplaceRegexpTask

ReplaceRegExp is a directory based task for replacing the occurrence of a given regular expression with a substitution pattern in a selected file or set of files.

Extends from
\Task
author
Jonathan Bond-Caron
copyright
2001,2002 THYRELL. All rights reserved
link
http://ant.apache.org/manual/OptionalTasks/replaceregexp.html
package
phing.tasks.system
version
$Id: ReplaceRegexpTask.php 1110 2011-05-23 16:00:43Z mrook $

Properties

Propertyprivate\RegularExpression  $_regexp= ''

Regular expression

Details
Type
\RegularExpression
Propertyprivate  $file= ''

Single file to process.

Details
Type
Propertyprivate  $filesets= 'array'

Any filesets that should be processed.

Default valuearrayDetails
Type

Methods

methodpublic  createFileSet( ) :
Nested creator, adds a set of files (nested fileset attribute).
methodpublic  init( ) :
methodpublic  main( ) :
methodpublic  setByline( bool $yesNo ) :
Match only per line
Parameters
Name Type Description
$yesNo bool
methodpublic  setFile( string $path ) :
File to apply regexp on
Parameters
Name Type Description
$path string
methodpublic  setFlags( string $flags ) :
Sets the regexp flags
Parameters
Name Type Description
$flags string
methodpublic  setMatch( string $regexp ) :
Sets the regexp match pattern
Parameters
Name Type Description
$regexp string
methodpublic  setPattern(  $regexp ) :
Parameters
Name Type Description
$regexp
Details
see
\setMatch()
methodpublic  setReplace( string $string ) :
Sets the replacement string
Parameters
Name Type Description
$string string
Documentation was generated by DocBlox 0.13.1.