phing-tasks-system

# Class: ResolvePathTask Source Location: /tasks/system/ResolvePathTask.php
### Class Overview
    ProjectComponent
       |
       --Task
          |
          --ResolvePathTask
Task for resolving relative paths and setting absolute path in property value. #### Author(s): Hans Lellelid <hans@xmpl.org> #### Version: $Revision: 552 $ #### Copyright: � 2001,2002 THYRELL. All rights reserved | ### Methods main setDir setFile setPath setPropertyName
### Inherited Variables #### Class: Task Task::$description Task::$location Task::$target Task::$taskName Task::$taskType Task::$wrapper #### Class: ProjectComponent ProjectComponent::$project | ### Inherited Methods #### Class: Task Task::getDescription() Returns the textual description of the task Task::getLocation() Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages. Task::getOwningTarget() Returns the owning target of this task. Task::getRegisterSlot() Returns a name Task::getRuntimeConfigurableWrapper() Returns the wrapper object for runtime configuration Task::getTaskName() Returns the name of task, used only for log messages Task::getTaskType() Returns the name of the task under which it was invoked, usually the XML tagname Task::init() Called by the parser to let the task initialize properly. Task::log() Provides a project level log event to the task. Task::main() Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice. Task::maybeConfigure() Configure this task if it hasn't been done already. Task::perform() Perfrom this task Task::setDescription() Sets a textual description of the task Task::setLocation() Sets the location within the buildfile this task occurs. Called by the parser to set location information. Task::setOwningTarget() Sets the owning target this task belongs to. Task::setRuntimeConfigurableWrapper() Sets the wrapper object this task should use for runtime configurable elements. Task::setTaskName() Sets the name of this task for log messages Task::setTaskType() Sets the type of the task. Usually this is the name of the XML tag #### 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 45] Task for resolving relative paths and setting absolute path in property value. This task was created to address a need for resolving absolute paths of files / directories. In many cases a relative directory (e.g. "./build") is specified, but it needs to be treated as an absolute path since other build files (e.g. in subdirs) should all be using the same path -- and not treating it as a relative path to their own directory. <property name="relative_path" value="./dirname"/> <resolvepath propertyName="absolute_path" file="${relative_path}"/> <echo>Resolved [absolute] path: ${absolute_path}</echo> TODO: Possibly integrate this with PackageAsPath, for handling/resolving dot-path paths. #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
version: | $Revision: 552 $
copyright: | � 2001,2002 THYRELL. All rights reserved
[ Top ] ### Class Methods ### method main [line 95]
`void main( )`
Perform the resolution & set property. #### Tags:
access: | public
Overrides Task::main() (Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.) [ Top ] ### method setDir [line 69]
`void setDir( $d)`
Sets a base dir to use for resolution. #### Parameters:
PhingFile | $d |
[ Top ] ### method setFile [line 88]
`void setFile( string $f)`
Sets a file that we want to resolve. #### Parameters:
string | $f |
[ Top ] ### method setPath [line 80]
`void setPath( string $f)`
Sets a path (file or directory) that we want to resolve. This is the same as setFile() -- just more generic name so that it's clear that you can also use it to set directory. #### Tags:
see: | ResolvePathTask::setFile()
#### Parameters:
string | $f |
[ Top ] ### method setPropertyName [line 61]
`void setPropertyName( string $v)`
Set the name of the property to set. #### Tags:
access: | public
#### Parameters:
string | $v | Property name
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:51:56 +0200 by phpDocumentor 1.4.3