# classes/phing/tasks/system/MatchingTask.php

## \MatchingTask
jump to top

This is an abstract task that should be used by all those tasks that require to include or exclude files based on pattern matching.

This is very closely based on the ANT class of the same name.

Extends from
  \Task
Implements
  \SelectorContainer
author
  Hans Lellelid (Phing)
author
  Arnout J. Kuiper (Ant)
author
  Stefano Mazzocchi (Ant)
author
  Sam Ruby (Ant)
author
  Jon S. Stevens (Ant
author
  Stefan Bodewig (Ant)
author
  Bruce Atherton (Ant)
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 532 $

### Properties

`\FileSet $fileset= ''`

Details

Type
  \FileSet

`boolean $useDefaultExcludes= 'true'`

Default value `true` Details

Type
  boolean

### Methods

`__construct( ) :`
Create instance; set fileset to new FileSet.
`appendSelector( \FileSelector $selector ) : void`
Add a new selector into this container.
Parameters

Name | Type | Description
--- | --- | ---
$selector | \FileSelector | the new selector to add

`createAnd( ) : \AndSelector`
add an "And" selector entry on the selector list
Returns

Type | Description
--- | ---
\AndSelector |

`createContains( ) : \ContainsSelector`
add a contains selector entry on the selector list
Returns

Type | Description
--- | ---
\ContainsSelector |

`createCustom( ) : \ExtendSelector`
add an extended selector entry on the selector list
Returns

Type | Description
--- | ---
\ExtendSelector |

`createDate( ) : \DateSelector`
add a selector date entry on the selector list
Returns

Type | Description
--- | ---
\DateSelector |

`createDepend( ) : \DependSelector`
add a depends selector entry on the selector list
Returns

Type | Description
--- | ---
\DependSelector |

`createDepth( ) : \DepthSelector`
add a depth selector entry on the selector list
Returns

Type | Description
--- | ---
\DepthSelector |

`createExclude( ) : \PatternSetNameEntry`
add a name entry on the exclude list
Returns

Type | Description
--- | ---
\PatternSetNameEntry |

`createExcludesFile( ) : \PatternSetNameEntry`
add a name entry on the include files list
Returns

Type | Description
--- | ---
\PatternSetNameEntry |

`createFilename( ) : \FilenameSelector`
add a selector filename entry on the selector list
Returns

Type | Description
--- | ---
\FilenameSelector |

`createInclude( ) : \PatternSetNameEntry`
add a name entry on the include list
Returns

Type | Description
--- | ---
\PatternSetNameEntry |

`createIncludesFile( ) : \PatternSetNameEntry`
add a name entry on the include files list
Returns

Type | Description
--- | ---
\PatternSetNameEntry |

`createMajority( ) : \MajoritySelector`
add a majority selector entry on the selector list
Returns

Type | Description
--- | ---
\MajoritySelector |

`createNone( ) : \NoneSelector`
add a "None" selector entry on the selector list
Returns

Type | Description
--- | ---
\NoneSelector |

`createNot( ) : \NotSelector`
add a "Not" selector entry on the selector list
Returns

Type | Description
--- | ---
\NotSelector |

`createOr( ) : void`
add an "Or" selector entry on the selector list
`createPatternSet( ) : \PatternSet`
add a set of patterns
Returns

Type | Description
--- | ---
\PatternSet |

`createPresent( ) : \PresentSelector`
add a present selector entry on the selector list
Returns

Type | Description
--- | ---
\PresentSelector |

`createSelector( ) : \SelectSelector`
add a "Select" selector entry on the selector list
Returns

Type | Description
--- | ---
\SelectSelector |

`createSize( ) : \SizeSelector`
add a selector size entry on the selector list
Returns

Type | Description
--- | ---
\SizeSelector |

`getDirectoryScanner( $baseDir ) : \DirectoryScanner`
Returns the directory scanner needed to access the files to process.
Parameters

Name | Type | Description
--- | --- | ---
$baseDir |  |

Returns

Type | Description
--- | ---
\DirectoryScanner |

`getImplicitFileSet( ) : \FileSet`
finalAccessor for the implict fileset.
Returns

Type | Description
--- | ---
\FileSet |

`getSelectors( $p ) : array`
Returns the set of selectors as an array.
Parameters

Name | Type | Description
--- | --- | ---
$p |  |

Returns

Type | Description
--- | ---
array |

`hasSelectors( ) : boolean`
Indicates whether there are any selectors here.
Returns

Type | Description
--- | ---
boolean |

`selectorCount( ) : int`
Gives the count of the number of selectors in this container
Returns

Type | Description
--- | ---
int |

`selectorElements( ) : \an`
Returns an enumerator for accessing the set of selectors.
Returns

Type | Description
--- | ---
\an |

`setCaseSensitive( boolean $isCaseSensitive ) : void`
Sets case sensitivity of the file system
Parameters

Name | Type | Description
--- | --- | ---
$isCaseSensitive | boolean | "true"|"on"|"yes" if file system is case sensitive, "false"|"off"|"no" when not.

`setDefaultexcludes( boolean $useDefaultExcludes ) :`
Sets whether default exclusions should be used or not.
Parameters

Name | Type | Description
--- | --- | ---
$useDefaultExcludes | boolean | "true"|"on"|"yes" when default exclusions should be used, "false"|"off"|"no" when they shouldn't be used.

`setExcludes( string $excludes ) :`
Sets the set of exclude patterns. Patterns may be separated by a comma or a space.
Parameters

Name | Type | Description
--- | --- | ---
$excludes | string | the string containing the exclude patterns

`setExcludesfile( \PhingFile $excludesfile ) : void`
Sets the name of the file containing the includes patterns.
Parameters

Name | Type | Description
--- | --- | ---
$excludesfile | \PhingFile | A string containing the filename to fetch the include patterns from.

`setFollowSymlinks( boolean $followSymlinks ) : void`
Sets whether or not symbolic links should be followed.
Parameters

Name | Type | Description
--- | --- | ---
$followSymlinks | boolean | whether or not symbolic links should be followed

`setIncludes( string $includes ) : void`
Sets the set of include patterns. Patterns may be separated by a comma or a space.
Parameters

Name | Type | Description
--- | --- | ---
$includes | string | the string containing the include patterns

`setIncludesfile( \PhingFile $includesfile ) : void`
Sets the name of the file containing the includes patterns.
Parameters

Name | Type | Description
--- | --- | ---
$includesfile | \PhingFile | A string containing the filename to fetch the include patterns from.

`setProject( $project ) :`
Parameters

Name | Type | Description
--- | --- | ---
$project |  |

Details

see
  \ProjectComponent::setProject()

Documentation was generated by DocBlox 0.13.1.