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

A convenience base class that you can subclass Selectors from. It provides some helpful common behaviour. Note that there is no need for Selectors to inherit from this class, it is only necessary that they implement FileSelector.

author
  Bruce Atherton
package
  phing.types.selectors

## \BaseSelector
jump to top

A convenience base class that you can subclass Selectors from. It provides some helpful common behaviour. Note that there is no need for Selectors to inherit from this class, it is only necessary that they implement FileSelector.

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
  \DataType
Implements
  \FileSelector
author
  Bruce Atherton
package
  phing.types.selectors
version
  $Revision: 526 $

### Properties

`$errmsg= 'null'`
Default value `null` Details

Type

### Methods

`getError( ) : \the`
Returns any error messages that have been set.
Returns

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

`setError( \msg $msg ) :`
Allows all selectors to indicate a setup error. Note that only the first error message is recorded.
Parameters

Name | Type | Description
--- | --- | ---
$msg | \msg | The error message any BuildException should throw.

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

Subclasses can override this method to provide checking of their state. So long as they call validate() from isSelected(), this will be called automatically (unless they override validate()).

Implementations should check for incorrect settings and call setError() as necessary.

Documentation was generated by DocBlox 0.13.1.