classes/phing/types/selectors/SelectorUtils.php
<p>This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any subclasses of DirectoryScanner that may access these methods.
This is a Singleton.
- author
- Hans Lellelid, hans@xmpl.org (Phing)
- author
- Arnout J. Kuiper, ajkuiper@wxs.nl (Ant)
- author
- Magesh Umasankar
- author
- Bruce Atherton, bruce@callenish.com (Ant)
- package
- phing.types.selectors
\SelectorUtils
<p>This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any subclasses of DirectoryScanner that may access these methods.
This is a Singleton.
- author
- Hans Lellelid, hans@xmpl.org (Phing)
- author
- Arnout J. Kuiper, ajkuiper@wxs.nl (Ant)
- author
- Magesh Umasankar
- author
- Bruce Atherton, bruce@callenish.com (Ant)
- package
- phing.types.selectors
Properties
Methods

isOutOfDate(
\PhingFile $src, \PhingFile $target, int $granularity
)
:
\whether| Name | Type | Description |
|---|---|---|
| $src | \PhingFile | the original file |
| $target | \PhingFile | the file being compared against |
| $granularity | int | the amount in seconds of slack we will give in determining out of dateness |
| Type | Description |
|---|---|
| \whether |

match(
\pattern $pattern, \str $str, \isCaseSensitive $isCaseSensitive
=
true
)
:
\<code>true</code>The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character
| Name | Type | Description |
|---|---|---|
| $pattern | \pattern | The pattern to match against. Must not be |
| $str | \str | The string which must be matched against the pattern. Must not be |
| $isCaseSensitive | \isCaseSensitive | Whether or not matching should be performed case sensitively. |
| Type | Description |
|---|---|
| \<code>true</code> |

matchPath(
\pattern $pattern, \str $str, \isCaseSensitive $isCaseSensitive
=
true
)
:
\<code>true</code>| Name | Type | Description |
|---|---|---|
| $pattern | \pattern | The pattern to match against. Must not be |
| $str | \str | The path to match, as a String. Must not be |
| $isCaseSensitive | \isCaseSensitive | Whether or not matching should be performed case sensitively. |
| Type | Description |
|---|---|
| \<code>true</code> |

matchPatternStart(
\pattern $pattern, \str $str, \isCaseSensitive $isCaseSensitive
=
true
)
:
\whether<
p>
This is not a general purpose test and should only be used if you
can live with false positives. For example, pattern=**\a
and str=b will yield true.
| Name | Type | Description |
|---|---|---|
| $pattern | \pattern | The pattern to match against. Must not be |
| $str | \str | The path to match, as a String. Must not be |
| $isCaseSensitive | \isCaseSensitive | Whether or not matching should be performed case sensitively. |
| Type | Description |
|---|---|
| \whether |