Task for setting properties in buildfiles.
Use {@link Project#createTask} to register a new Task.
author |
Andreas Aderhold andi@binarycloud.com |
---|---|
author |
Hans Lellelid hans@xmpl.org |
version |
$Id: 70cd33a5157fb4756de29c25d18731afd7f1b0d7 $ |
package |
phing.tasks.system |
setName($name)
getName()
setValue($value)
addText($value)
since | 2.2.0 |
---|
getValue()
setFile($file)
getFile()
getRefid()
setPrefix(string $prefix) : void
A "." is appended to the prefix if not specified.
since | 2.0 |
---|
string
prefix string
getPrefix() : string
since | 2.0 |
---|
string
setEnvironment($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.
getEnvironment()
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
getUserProperty()
setOverride($v)
getOverride()
toString()
getFallback()
createFilterChain() : object
access |
public |
---|
object
The created filterchain object
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
loadEnvironment(string $prefix)
string
prefix to place before them
addProperties($props)
addProperty(string $name, string $value)
string
name of property
string
value to set
resolveAllProperties(\Properties $props) : void
parsePropertyString(string $value, $fragments, $propertyRefs)
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
setOwningTarget(\Target $target)
getOwningTarget() : \Target
getTaskName() : string
string
Name of this task
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
getTaskType() : string
string
The type of this task (XML Tag)
setTaskType($name)
getRegisterSlot(string $slotName)
string
log(string $msg, integer $level = \Project::MSG_INFO)
string
The message to be logged.
integer
The message's priority at this message should have
setDescription(string $desc)
string
The text describing the task
getDescription() : string
string
The text description of the task
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws |
---|
getLocation() : \Location
setLocation(\Location $location)
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
maybeConfigure()
perform()
setProject(\Project $project)
getProject() : \Project
name :
value :
reference :
env :
file :
ref :
prefix :
fallback :
override :
userProperty :
filterChains :
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project