Task for setting properties in buildfiles.
Use Project#createTask to register a new Task.
| author | Andreas Aderhold |
|---|---|
| author | Hans Lellelid |
| version | $Id: 91bfc1c2cd5f3bc5733cf435c589a7663b7bb0da $ |
| package | phing.tasks.system |
| copyright | 2001,2002 THYRELL. All rights reserved |
addText($value)
| since | 2.2.0 |
|---|
createFilterChain() : object
| access | public |
|---|
objectThe created filterchain objectgetDescription() : string
| inherited_from | \Task::getDescription() |
|---|
stringThe text description of the taskgetEnvironment()
getFallback()
getFile()
getLocation() : \Location
Used by BuildException to give detailed error messages.
| inherited_from | \Task::getLocation() |
|---|
\LocationThe location object describing the position of this
task within the buildfile.getName()
getOverride()
getPrefix() : string
| since | 2.0 |
|---|
stringgetProject() : \Project
| inherited_from | \ProjectComponent::getProject() |
|---|---|
| inherited_from | \Task::getProject() |
\ProjectReference to current porject objectgetRefid()
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
| inherited_from | \Task::getRuntimeConfigurableWrapper() |
|---|
\RuntimeConfigurableThe wrapper object used by this taskgetTaskName() : string
| inherited_from | \Task::getTaskName() |
|---|
stringName of this taskgetTaskType() : string
| inherited_from | \Task::getTaskType() |
|---|
stringThe 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 | \BuildEvent |
|---|---|
| see | \BuildListener |
| inherited_from | \Task::log() |
stringThe message to log
integerThe 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() |
|---|
stringThe 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.
\envprefix
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 |
|---|
stringprefix 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
stringA string representing the name of this task for logsetTaskType(string $name)
Usually this is the name of the XML tag
| inherited_from | \Task::setTaskType() |
|---|
stringThe 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)
mixedValue of name, all scalars allowed
toString()
addProperties($props)
addProperty(string $name, string $value)
stringname of property
stringvalue to set
getRegisterSlot(string $slotName)
| inherited_from | \Task::getRegisterSlot() |
|---|
string
loadEnvironment(string $prefix)
stringprefix 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.
stringThe 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