# classes/phing/types/selectors/BaseSelectorContainer.php

## \BaseSelectorContainer
jump to top

This is the base class for selectors that can contain other selectors.

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
  \BaseSelector
Implements
  \SelectorContainer
author
  Bruce Atherton (Ant)
package
  phing.types.selectors
version
  $Revision: 526 $

### Properties

`$selectorsList= 'array'`
Default value `array` Details

Type

### Methods

`appendSelector( \selector $selector ) : \the`
Add a new selector into this container.
Parameters

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

Returns

Type | Description
--- | ---
\the |

`createAnd( ) :`
add an "And" selector entry on the selector list
`createContains( ) :`
add a contains selector entry on the selector list
`createContainsRegexp( ) :`
add a contains selector entry on the selector list
`createCustom( ) :`
add an extended selector entry on the selector list
`createDate( ) :`
add a selector date entry on the selector list
`createDepend( ) :`
add a depends selector entry on the selector list
`createDepth( ) :`
add a depth selector entry on the selector list
`createFilename( ) :`
add a selector filename entry on the selector list
`createMajority( ) :`
add a majority selector entry on the selector list
`createNone( ) :`
add a "None" selector entry on the selector list
`createNot( ) :`
add a "Not" selector entry on the selector list
`createOr( ) :`
add an "Or" selector entry on the selector list
`createPresent( ) :`
add a present selector entry on the selector list
`createSelector( ) :`
add a "Select" selector entry on the selector list
`createSize( ) :`
add a selector size entry on the selector list
`createType( ) :`
add a type selector entry on the selector list
`getSelectors( $p ) :`
Returns a copy of the selectors as an array.
Parameters

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

`hasSelectors( ) :`
Indicates whether there are any selectors here.
`selectorCount( ) :`
Gives the count of the number of selectors in this container
`selectorElements( ) :`
Returns an array for accessing the set of selectors (not a copy).
`toString( ) : \comma`
Convert the Selectors within this container to a string. This will just be a helper class for the subclasses that put their own name around the contents listed here.
Returns

Type | Description
--- | ---
\comma |

`validate( ) :`

This implementation validates the container by calling verifySettings() and then validates each contained selector provided that the selector implements the validate interface.

Ordinarily, this will validate all the elements of a selector container even if the isSelected() method of some elements is never called. This has two effects:

- Validation will often occur twice.
- Since it is not required that selectors derive from BaseSelector, there could be selectors in the container whose error conditions are not detected if their isSelected() call is never made.

Documentation was generated by DocBlox 0.13.1.