Appendix G. Core selectors

Selectors are a specific subset of Phing data types that allow you to fine-tune matching in a Appendix D, Core TypesFileSet (or DirSet).

Phing supports the following core selectors, which typically match on both files and directories in a <fileset>:

Additionally, to create more complex selections, a variety of selectors that contain other selectors are available for your use. They combine the selections of their child selectors in various ways.

Phing supports the following selector containers:

G.1 Contains

The <contains> tag selects files that contain the string specified by the text attribute.

<fileset dir="${src}" includes="**/*.php">
  <contains text="PHP"/>

Table G.1:  Attributes for the <contains> selector

textSpecifies the text that every file must containn/aYes
casesensitiveWhether to pay attention to case when looking for the string in the text attribute.trueNo
ignorewhitespaceWhether to eliminate whitespace before checking for the string in the text attribute.falseNo