classes/phing/types/selectors/BaseSelectorContainer.php

\BaseSelectorContainer

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

Propertyprivate  $selectorsList= 'array'
Default valuearrayDetails
Type

Methods

methodpublic  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
methodpublic  createAnd( ) :
add an "And" selector entry on the selector list
methodpublic  createContains( ) :
add a contains selector entry on the selector list
methodpublic  createContainsRegexp( ) :
add a contains selector entry on the selector list
methodpublic  createCustom( ) :
add an extended selector entry on the selector list
methodpublic  createDate( ) :
add a selector date entry on the selector list
methodpublic  createDepend( ) :
add a depends selector entry on the selector list
methodpublic  createDepth( ) :
add a depth selector entry on the selector list
methodpublic  createFilename( ) :
add a selector filename entry on the selector list
methodpublic  createMajority( ) :
add a majority selector entry on the selector list
methodpublic  createNone( ) :
add a "None" selector entry on the selector list
methodpublic  createNot( ) :
add a "Not" selector entry on the selector list
methodpublic  createOr( ) :
add an "Or" selector entry on the selector list
methodpublic  createPresent( ) :
add a present selector entry on the selector list
methodpublic  createSelector( ) :
add a "Select" selector entry on the selector list
methodpublic  createSize( ) :
add a selector size entry on the selector list
methodpublic  createType( ) :
add a type selector entry on the selector list
methodpublic  getSelectors(  $p ) :
Returns a copy of the selectors as an array.
Parameters
Name Type Description
$p
methodpublic  hasSelectors( ) :
Indicates whether there are any selectors here.
methodpublic  selectorCount( ) :
Gives the count of the number of selectors in this container
methodpublic  selectorElements( ) :
Returns an array for accessing the set of selectors (not a copy).
methodpublic  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
methodpublic  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.