classes/phing/types/PatternSet.php
\PatternSet
The patternset storage component. Carries all necessary data and methods for the patternset stuff.
This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
- Extends from
- \DataType
- author
- Andreas Aderhold, andi@binarycloud.com
- package
- phing.types
- version
- $Revision: 1097 $
Properties
Methods

addPatternToList(
array $list
)
:
\PatternSetNameEntryadd a name entry to the given list
| Name | Type | Description |
|---|---|---|
| $list | array | List onto which the nameentry should be added |
| Type | Description |
|---|---|
| \PatternSetNameEntry |

append(
$other, $p
)
:
Adds the patterns of the other instance to this set.
| Name | Type | Description |
|---|---|---|
| $other | ||
| $p |

createExclude(
)
:
\PatternSetNameEntryAdd a name entry on the exclude list
| Type | Description |
|---|---|
| \PatternSetNameEntry |
- throws

createExcludesFile(
)
:
\PatternSetNameEntryadd a name entry on the exclude files list
| Type | Description |
|---|---|
| \PatternSetNameEntry |
- throws

createInclude(
)
:
\PatternSetNameEntryAdd a name entry on the include list
| Type | Description |
|---|---|
| \PatternSetNameEntry |
- throws

createIncludesFile(
)
:
\PatternSetNameEntryAdd a name entry on the include files list
| Type | Description |
|---|---|
| \PatternSetNameEntry |
- throws

getExcludePatterns(
$p
)
:
Returns the filtered exclude patterns.
| Name | Type | Description |
|---|---|---|
| $p |

getIncludePatterns(
$p
)
:
Returns the filtered include patterns.
| Name | Type | Description |
|---|---|---|
| $p |

getRef(
$p
)
:
Performs the check for circular references and returns the
referenced PatternSet.
| Name | Type | Description |
|---|---|---|
| $p |

makeArray(
$list, $p
)
:
Convert a array of PatternSetNameEntry elements into an array of Strings.
| Name | Type | Description |
|---|---|---|
| $list | ||
| $p |

readFiles(
$p
)
:
Read includesfile or excludesfile if not already done so.
| Name | Type | Description |
|---|---|---|
| $p |

readPatterns(
$patternfile, $patternlist, $p
)
:
Reads path matching patterns from a file and adds them to the
includes or excludes list
| Name | Type | Description |
|---|---|---|
| $patternfile | ||
| $patternlist | ||
| $p |

setExcludes(
string $excludes
)
:
voidSets the set of exclude patterns. Patterns may be separated by a comma
or a space.
| Name | Type | Description |
|---|---|---|
| $excludes | string | the string containing the exclude patterns |
- throws

setExcludesFile(
\excludesFile $excludesFile
)
:
Sets the name of the file containing the excludes patterns.
| Name | Type | Description |
|---|---|---|
| $excludesFile | \excludesFile | The file to fetch the exclude patterns from. |

setIncludes(
string $includes
)
:
voidSets the set of include patterns. Patterns may be separated by a comma
or a space.
| Name | Type | Description |
|---|---|---|
| $includes | string | the string containing the include patterns |
- throws

setIncludesFile(
\includesFile $includesFile
)
:
Sets the name of the file containing the includes patterns.
| Name | Type | Description |
|---|---|---|
| $includesFile | \includesFile | The file to fetch the include patterns from. |

setRefid(
$r
)
:
Makes this instance in effect a reference to another PatternSet
instance.
You must not set another attribute or nest elements inside this element if you make it a reference.
| Name | Type | Description |
|---|---|---|
| $r |
\PatternSetNameEntry
"Internal" class for holding an include/exclude pattern.
- package
- phing.types
Properties
Methods

evalName(
$project
)
:
stringEvaluates the pattern.
| Name | Type | Description |
|---|---|---|
| $project |
| Type | Description |
|---|---|
| string |

setIf(
string $cond
)
:
Sets an if-condition property for this pattern to match.
| Name | Type | Description |
|---|---|---|
| $cond | string |

setName(
string $name
)
:
Set the pattern text.
| Name | Type | Description |
|---|---|---|
| $name | string | The pattern |

setPattern(
string $pattern
)
:
An alias for the setName() method.
| Name | Type | Description |
|---|---|---|
| $pattern | string |
- see
- \setName()

setUnless(
string $cond
)
:
Sets an unless-condition property for this pattern to match.
| Name | Type | Description |
|---|---|---|
| $cond | string |