phing-types

# Class: Mapper Source Location: /types/Mapper.php
### Class Overview
    ProjectComponent
       |
       --DataType
          |
          --Mapper
Filename Mapper maps source file name(s) to target file name(s). #### Author(s): Hans Lellelid <hans@xmpl.org> #### Version: $Revision: 526 $ | ### Variables $classname $classpath $classpathId $from $to $type | ### Methods __construct createClasspath getImplementation setClassname setClasspath setClasspathRef setFrom setRefid setTo setType
### Inherited Variables #### Class: DataType DataType::$checked DataType::$description DataType::$ref #### Class: ProjectComponent ProjectComponent::$project | ### Inherited Methods #### 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 42] Filename Mapper maps source file name(s) to target file name(s). Built-in mappers can be accessed by specifying they "type" attribute: <mapper type="glob" from="*.php" to="*.php.bak"/> Custom mappers can be specified by providing a dot-path to a include_path-relative class: <mapper classname="myapp.mappers.DevToProdMapper" from="*.php" to="*.php"/> <!-- maps all PHP files from development server to production server, for example --> #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
version: | $Revision: 526 $
[ Top ] ### Class Variables #### $classname = [line 45] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $classpath = [line 48] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $classpathId = [line 49] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $from = [line 46] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $to = [line 47] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $type = [line 44] #### Tags:
access: | protected
Type: | mixed
[ Top ] ### Class Methods ### constructor __construct [line 52]
`Mapper __construct( $project)`
#### Parameters:
Project | $project |
[ Top ] ### method createClasspath [line 75]
`void createClasspath( )`
Create the classpath to be used when searching for component being defined #### Tags:
access: | public
[ Top ] ### method getImplementation [line 145]
`void getImplementation( )`
Factory, returns inmplementation of file name mapper as new instance [ Top ] ### method setClassname [line 105]
`void setClassname( $classname)`
Set the class name of the FileNameMapper to use. #### Parameters:
| $classname |
[ Top ] ### method setClasspath [line 61]
`void setClasspath( Path $classpath)`
Set the classpath to be used when searching for component being defined #### Tags:
access: | public
#### Parameters:
Path | $classpath | An Path object containing the classpath.
[ Top ] ### method setClasspathRef [line 88]
`void setClasspathRef( Reference $r)`
Reference to a classpath to use when loading the files. #### Tags:
access: | public
#### Parameters:
Reference | $r |
[ Top ] ### method setFrom [line 115]
`void setFrom( $from)`
Set the argument to FileNameMapper.setFrom #### Parameters:
| $from |
[ Top ] ### method setRefid [line 137]
`void setRefid( Reference $r)`
Make this Mapper instance a reference to another Mapper. You must not set any other attribute if you make it a reference. Overrides DataType::setRefid() (Set the value of the refid attribute.) #### Parameters:
Reference | $r |
[ Top ] ### method setTo [line 125]
`void setTo( $to)`
Set the argument to FileNameMapper.setTo #### Parameters:
| $to |
[ Top ] ### method setType [line 97]
`void setType( $type)`
Set the type of FileNameMapper to use. #### Parameters:
| $type |
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:51:15 +0200 by phpDocumentor 1.4.3