classes/phing/tasks/system/ForeachTask.php

\ForeachTask

<foreach> task

Task definition for the foreach task. This task takes a list with delimited values, and executes a target with set param.

Usage:

Attributes: list --> The list of values to process, with the delimiter character, indicated by the "delimiter" attribute, separating each value. target --> The target to call for each token, passing the token as the parameter with the name indicated by the "param" attribute. param --> The name of the parameter to pass the tokens in as to the target. delimiter --> The delimiter string that separates the values in the "list" parameter. The default is ",".

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

Properties

Propertyprivate  $absparam= ''

Name of absolute path parameter to pass to callee

Details
Type
Propertyprivate\PhingCallTask  $callee= ''

PhingCallTask that will be invoked w/ calleeTarget.

Details
Type
\PhingCallTask
Propertyprivatestring  $calleeTarget= ''

Target to execute.

Details
Type
string
Propertyprivate  $delimiter= ','

Delimiter that separates items in $list

Default value,Details
Type
Propertyprivatearray  $filelists= 'array'

Array of filelists

Default valuearrayDetails
Type
array
Propertyprivate  $filesets= 'array'

Array of filesets

Default valuearrayDetails
Type
Propertyprivate  $list= ''

Delimter-separated list of values to process.

Details
Type
Propertyprivate  $param= ''

Name of parameter to pass to callee

Details
Type
Propertyprivateinteger  $total_dirs= '0'

Total number of directories processed

Default value0Details
Type
integer
Propertyprivateinteger  $total_files= '0'

Total number of files processed

Default value0Details
Type
integer

Methods

methodpublic  createFileList( ) : \FileList
Supports embedded element.
Returns
Type Description
\FileList
methodpublic  createFileSet( ) :
Nested creator, adds a set of files (nested fileset attribute).
methodpublic  createProperty( ) : \Property
Returns
Type Description
\Property
methodpublic  init( ) :
methodpublic  main( ) : void
This method does the work.
methodprotected  process( \Task $callee, \PhingFile $fromDir, array $srcFiles, array $srcDirs ) :
Processes a list of files & directories
Parameters
Name Type Description
$callee \Task
$fromDir \PhingFile
$srcFiles array
$srcDirs array
methodpublic  setAbsparam(  $absparam ) :
Parameters
Name Type Description
$absparam
methodpublic  setDelimiter(  $delimiter ) :
Parameters
Name Type Description
$delimiter
methodpublic  setList(  $list ) :
Parameters
Name Type Description
$list
methodpublic  setParam(  $param ) :
Parameters
Name Type Description
$param
methodpublic  setTarget(  $target ) :
Parameters
Name Type Description
$target
Documentation was generated by DocBlox 0.13.1.