phing-types

# Class: DataType Source Location: /types/DataType.php
### Class Overview
    ProjectComponent
       |
       --DataType
Base class for those classes that can appear inside the build file as stand alone data types. #### Author(s): Hans Lellelid <hans@xmpl.org> Andreas Aderhold <andi@binarycloud.com> #### Version: $Revision: 526 $ | ### Variables $checked $description $ref | ### Methods circularReference dieOnCircularReference getCheckedRef getDescription isReference noChildrenAllowed parsingComplete setDescription setRefid tooManyAttributes
### Child classes: PhpCpdTask_FormatterElement Base class for those classes that can appear inside the build file as stand alone data types. PhpCodeSnifferTask_FormatterElement Base class for those classes that can appear inside the build file as stand alone data types. Parameter A parameter is composed of a name, type and value. Nested Parameters are also possible, but the using task/type has to support them TokenSource A parameter is composed of a name, type and value. PhingFilterReader A PhingFilterReader is a wrapper class that encloses the className and configuration of a Configurable FilterReader. FilterChain FilterChain may contain a chained set of filter readers. Mapper Filename Mapper maps source file name(s) to target file name(s). RegularExpression A regular expression datatype. Keeps an instance of the AbstractFileSet The FileSet class provides methods and properties for accessing and managing filesets. It extends ProjectComponent and thus inherits all methods and properties (not explicitly declared). See ProjectComponent for further detail. Description Description is used to provide a project-wide description element (that is, a description that applies to a buildfile as a whole). Path This object represents a path as used by include_path or PATH environment variable. PatternSet The patternset storage component. Carries all necessary data and methods for the patternset stuff. FileList FileList represents an explicitly named list of files. FileLists are useful when you want to capture a list of files regardless of whether they currently exist. BaseSelector 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. | ### Inherited Variables #### Class: ProjectComponent ProjectComponent::$project | ### Inherited Methods #### 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 36] Base class for those classes that can appear inside the build file as stand alone data types. 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) #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
author: | Andreas Aderhold <andi@binarycloud.com>
version: | $Revision: 526 $
[ Top ] ### Class Variables #### $checked = true [line 52] Are we sure we don't hold circular references? Subclasses are responsible for setting this value to false if we'd need to investigate this condition (usually because a child element has been added that is a subclass of DataType). #### Tags:
access: | protected
Type: | boolean
[ Top ] #### $description = null [line 39] The descriptin the user has set. #### Tags:
access: | public
Type: | mixed
[ Top ] #### $ref = null [line 42] Value to the refid attribute. Type of Reference #### Tags:
access: | public
Type: | mixed
[ Top ] ### Class Methods ### method circularReference [line 171]
`void circularReference( )`
Creates an exception that indicates the user has generated a loop of data types referencing each other. [ Top ] ### method dieOnCircularReference [line 101]
`void dieOnCircularReference( &$stk, $p)`
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). If one is included, throw a BuildException created by circularReference This implementation is appropriate only for a DataType that cannot hold other DataTypes as children. The general contract of this method is that it shouldn't do anything if checked is true and set it to true on exit. Overridden in child classes as: Path::dieOnCircularReference() Overrides the version of DataType to recurse on all DataType child elements that may have been added. #### Parameters:
| &$stk |
Project | $p |
[ Top ] ### method getCheckedRef [line 134]
`void getCheckedRef( $requiredClass, $dataTypeName)`
Performs the check for circular references and returns the referenced object. #### Parameters:
| $requiredClass |
| $dataTypeName |
[ Top ] ### method getDescription [line 63]
`void getDescription( )`
Return the description for the current data type. [ Top ] ### method isReference [line 68]
`void isReference( )`
Has the refid attribute of this element been set? [ Top ] ### method noChildrenAllowed [line 163]
`void noChildrenAllowed( )`
Creates an exception that indicates that this XML element must not have child elements if the refid attribute is set. [ Top ] ### method parsingComplete [line 180]
`void parsingComplete( )`
Template method being called when the data type has been parsed completely. Overridden in child classes as: PhpCpdTask_FormatterElement::parsingComplete() Validate config. PhpCodeSnifferTask_FormatterElement::parsingComplete() Validate config. [ Top ] ### method setDescription [line 58]
`void setDescription( $desc)`
Sets a description of the current data type. It will be useful in commenting what we are doing. #### Parameters:
| $desc |
[ Top ] ### method setRefid [line 82]
`void setRefid( Reference $r)`
Set the value of the refid attribute. Subclasses may need to check whether any other attributes have been set as well or child elements have been created and thus override this method. if they do they must call parent::setRefid() Overridden in child classes as: PhingFilterReader::setRefid() FilterChain::setRefid() Mapper::setRefid() Make this Mapper instance a reference to another Mapper. AbstractFileSet::setRefid() Makes this instance in effect a reference to another PatternSet instance. Path::setRefid() Makes this instance in effect a reference to another Path instance. PatternSet::setRefid() Makes this instance in effect a reference to another PatternSet instance. FileList::setRefid() Makes this instance in effect a reference to another FileList instance. #### Parameters:
Reference | $r |
[ Top ] ### method tooManyAttributes [line 155]
`void tooManyAttributes( )`
Creates an exception that indicates that refid has to be the only attribute if it is set. [ Top ] Documentation generated on Mon, 19 Oct 2009 10:50:42 +0200 by phpDocumentor 1.4.3