phing-types-selectors
[ class tree: phing-types-selectors ] [ index: phing-types-selectors ] [ all elements ]

Class: BaseSelectorContainer

Source Location: /types/selectors/BaseSelectorContainer.php

Class Overview

ProjectComponent
   |
   --DataType
      |
      --BaseSelector
         |
         --BaseSelectorContainer

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


Author(s):

Version:

  • $Revision: 526 $

Implements interfaces:

Methods


Child classes:

OrSelector
This selector has a collection of other selectors, any of which have to select a file in order for this selector to select it.
AndSelector
This selector has a collection of other selectors, all of which have to select a file in order for this selector to select it.
NoneSelector
This selector has a collection of other selectors. All of those selectors must refuse to select a file before the file is considered selected by this selector.
MajoritySelector
This selector is here just to shake up your thinking a bit. Don't get

Inherited Variables

Inherited Methods

Class: BaseSelector

BaseSelector::getError()
Returns any error messages that have been set.
BaseSelector::setError()
Allows all selectors to indicate a setup error. Note that only the first error message is recorded.
BaseSelector::validate()
Subclasses can use this to throw the requisite exception in isSelected() in the case of an error condition.
BaseSelector::verifySettings()
<p>Subclasses can override this method to provide checking of their

Class: DataType

DataType::circularReference()
Creates an exception that indicates the user has generated a loop of data types referencing each other.
DataType::dieOnCircularReference()
Check to see whether any DataType we hold references to is included in the Stack (which holds all DataType instances that directly or indirectly reference this instance, including this instance itself).
DataType::getCheckedRef()
Performs the check for circular references and returns the referenced object.
DataType::getDescription()
Return the description for the current data type.
DataType::isReference()
Has the refid attribute of this element been set?
DataType::noChildrenAllowed()
Creates an exception that indicates that this XML element must not have child elements if the refid attribute is set.
DataType::parsingComplete()
Template method being called when the data type has been parsed completely.
DataType::setDescription()
Sets a description of the current data type. It will be useful in commenting what we are doing.
DataType::setRefid()
Set the value of the refid attribute.
DataType::tooManyAttributes()
Creates an exception that indicates that refid has to be the only attribute if it is set.

Class: ProjectComponent

ProjectComponent::getProject()
Returns a reference to current project
ProjectComponent::log()
Logs a message with the given priority.
ProjectComponent::setProject()
References the project to the current component.

Class Details

[line 32]
This is the base class for selectors that can contain other selectors.



Tags:

author:  <href="mailto:bruce@callenish.com" a href="mailto:bruce@callenish.com">Bruce Atherton</a> (Ant)
version:  $Revision: 526 $
abstract:  


[ Top ]


Class Methods


method appendSelector [line 90]

the appendSelector( FileSelector $selector)

Add a new selector into this container.



Tags:

return:  selector that was added
access:  public


Overridden in child classes as:

SelectSelector::appendSelector()
Add a new selector into this container.


Implementation of:
SelectorContainer::appendSelector()
Add a new selector into this container.

Parameters:

selector   $selector   the new selector to add

[ Top ]

method createAnd [line 137]

void createAnd( )

add an "And" selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createAnd()
add an "And" selector entry on the selector list
[ Top ]

method createContains [line 218]

void createContains( )

add a contains selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createContains()
add a contains selector entry on the selector list
[ Top ]

method createContainsRegexp [line 227]

void createContainsRegexp( )

add a contains selector entry on the selector list



Tags:

access:  public


[ Top ]

method createCustom [line 209]

void createCustom( )

add an extended selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createCustom()
add an extended selector entry on the selector list
[ Top ]

method createDate [line 182]

void createDate( )

add a selector date entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createDate()
add a selector date entry on the selector list
[ Top ]

method createDepend [line 254]

void createDepend( )

add a depends selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createDepend()
add a depends selector entry on the selector list
[ Top ]

method createDepth [line 245]

void createDepth( )

add a depth selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createDepth()
add a depth selector entry on the selector list
[ Top ]

method createFilename [line 200]

void createFilename( )

add a selector filename entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createFilename()
add a selector filename entry on the selector list
[ Top ]

method createMajority [line 173]

void createMajority( )

add a majority selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createMajority()
add a majority selector entry on the selector list
[ Top ]

method createNone [line 164]

void createNone( )

add a "None" selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createNone()
add a "None" selector entry on the selector list
[ Top ]

method createNot [line 155]

void createNot( )

add a "Not" selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createNot()
add a "Not" selector entry on the selector list
[ Top ]

method createOr [line 146]

void createOr( )

add an "Or" selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createOr()
add an "Or" selector entry on the selector list
[ Top ]

method createPresent [line 236]

void createPresent( )

add a present selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createPresent()
add a present selector entry on the selector list
[ Top ]

method createSelector [line 128]

void createSelector( )

add a "Select" selector entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createSelector()
add a "Select" selector entry on the selector list
[ Top ]

method createSize [line 191]

void createSize( )

add a selector size entry on the selector list



Tags:

access:  public



Implementation of:
SelectorContainer::createSize()
add a selector size entry on the selector list
[ Top ]

method createType [line 263]

void createType( )

add a type selector entry on the selector list



Tags:

access:  public


[ Top ]

method getSelectors [line 53]

void getSelectors( $p)

Returns a copy of the selectors as an array.



Tags:

access:  public


Overridden in child classes as:

SelectSelector::getSelectors()
Returns the set of selectors as an array.


Implementation of:
SelectorContainer::getSelectors()
Returns a *copy* of the set of selectors as an array.

Parameters:

Project   $p  

[ Top ]

method hasSelectors [line 39]

void hasSelectors( )

Indicates whether there are any selectors here.



Tags:

access:  public


Overridden in child classes as:

SelectSelector::hasSelectors()
Indicates whether there are any selectors here.


Implementation of:
SelectorContainer::hasSelectors()
Indicates whether there are any selectors here.
[ Top ]

method selectorCount [line 46]

void selectorCount( )

Gives the count of the number of selectors in this container



Tags:

access:  public


Overridden in child classes as:

SelectSelector::selectorCount()
Gives the count of the number of selectors in this container


Implementation of:
SelectorContainer::selectorCount()
Gives the count of the number of selectors in this container
[ Top ]

method selectorElements [line 64]

void selectorElements( )

Returns an array for accessing the set of selectors (not a copy).



Tags:

access:  public


Overridden in child classes as:

SelectSelector::selectorElements()
Returns an enumerator for accessing the set of selectors.


Implementation of:
SelectorContainer::selectorElements()
Returns an array for accessing the set of selectors.
[ Top ]

method toString [line 75]

comma toString( )

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.



Tags:

return:  separated list of Selectors contained in this one
access:  public


Overridden in child classes as:

OrSelector::toString()
AndSelector::toString()
SelectSelector::toString()
NoneSelector::toString()
NotSelector::toString()
MajoritySelector::toString()

[ Top ]

method validate [line 110]

void validate( )

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

</p> <p>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:</p>

  • 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.




Tags:

access:  public


Overrides BaseSelector::validate() (Subclasses can use this to throw the requisite exception in isSelected() in the case of an error condition.)

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:50:24 +0200 by phpDocumentor 1.4.3