Task for setting properties in buildfiles.
Use Project#createTask to register a new Task.
author | Andreas Aderhold |
---|---|
author | Hans Lellelid |
version | $Id: e6d7123b6331d5032ad1e67967cf54ef2aae3f7f $ |
package | phing.tasks.system |
copyright | 2001,2002 THYRELL. All rights reserved |
addText($value)
since | 2.2.0 |
---|
createFilterChain() : object
access | public |
---|
object
The created filterchain objectgetDescription() : string
inherited_from | \Task::getDescription() |
---|
string
The text description of the taskgetEnvironment()
getFallback()
getFile()
getLocation() : \Location
Used by BuildException to give detailed error messages.
inherited_from | \Task::getLocation() |
---|
\Location
The location object describing the position of this
task within the buildfile.getName()
getOverride()
getPrefix() : string
since | 2.0 |
---|
string
getProject() : \Project
inherited_from | \ProjectComponent::getProject() |
---|---|
inherited_from | \Task::getProject() |
\Project
Reference to current porject objectgetRefid()
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
inherited_from | \Task::getRuntimeConfigurableWrapper() |
---|
\RuntimeConfigurable
The wrapper object used by this taskgetTaskName() : string
inherited_from | \Task::getTaskName() |
---|
string
Name of this taskgetTaskType() : string
inherited_from | \Task::getTaskType() |
---|
string
The type of this task (XML Tag)getUserProperty()
getValue()
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
inherited_from | \Task::init() |
---|
\BuildException |
---|
log(string $msg, integer $level)
see | \global\BuildEvent |
---|---|
see | \global\BuildListener |
inherited_from | \Task::log() |
string
The message to log
integer
The priority of the message
main()
if the task was give a file or env attribute here is where it is loaded
maybeConfigure()
inherited_from | \Task::maybeConfigure() |
---|
perform()
inherited_from | \Task::perform() |
---|
setDescription(string $desc)
inherited_from | \Task::setDescription() |
---|
string
The text describing the task
setEnvironment(\env $env)
Thus if you specify environment="myenv" you will be able to access OS-specific environment variables via property names "myenv.PATH" or "myenv.TERM".
<
p>
Note that if you supply a property name with a final
"." it will not be doubled. ie environment="myenv." will still
allow access of environment variables through "myenv.PATH" and
"myenv.TERM". This functionality is currently only implemented
on select platforms. Feel free to send patches to increase the number of platforms
this functionality is supported on ;).
Note also that properties are case sensitive, even if the
environment variables on your operating system are not, e.g. it
will be ${env.Path} not ${env.PATH} on Windows 2000.
\env
prefix
setFile($file)
setLocation(\Location $location)
Called by the parser to set location information.
inherited_from | \Task::setLocation() |
---|
setName($name)
setOverride($v)
setOwningTarget(\Target $target)
setPrefix(string $prefix) : void
A "." is appended to the prefix if not specified.
since | 2.0 |
---|
string
prefix string
setProject(\Project $project)
inherited_from | \ProjectComponent::setProject() |
---|---|
inherited_from | \Task::setProject() |
setRefid(\Reference $ref)
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
inherited_from | \Task::setRuntimeConfigurableWrapper() |
---|
setTaskName(string $name) : string
inherited_from | \Task::setTaskName() |
---|
string
string
A string representing the name of this task for logsetTaskType(string $name)
Usually this is the name of the XML tag
inherited_from | \Task::setTaskType() |
---|
string
The type of this task (XML Tag)
setUserProperty(boolean $v)
This is deprecated in Ant 1.5, but the userProperty attribute of the class is still being set via constructor, so Phing will allow this method to function.
boolean
setValue(mixed $value)
mixed
Value of name, all scalars allowed
toString()
addProperties($props)
addProperty(string $name, string $value)
string
name of property
string
value to set
getRegisterSlot(string $slotName)
inherited_from | \Task::getRegisterSlot() |
---|
string
loadEnvironment(string $prefix)
string
prefix to place before them
parsePropertyString(string $value, array $fragments, array $propertyRefs)
The first list is a collection of text fragments, while the other is a set of string property names null entries in the first list indicate a property reference from the second list.
This is slower than regex, but useful for this class, which has to handle multiple parsing passes for properties.
string
The string to be scanned for property references
array
&$fragments The found fragments
array
&$propertyRefs The found refs
resolveAllProperties(\Properties $props) : void
$description : string
inherited_from | \Task::$$description |
---|
$env
$fallback
$file
$filterChains
$name
$override
$prefix
$project : \Project
inherited_from | \ProjectComponent::$$project |
---|---|
inherited_from | \Task::$$project |
$ref
$reference
$taskName : string
inherited_from | \Task::$$taskName |
---|
$taskType : string
inherited_from | \Task::$$taskType |
---|
$userProperty
$value