Task for setting properties from an XML file in buildfiles.
Use {@link Project#createTask} to register a new Task.
| author |
Jonathan Bond-Caron jbondc@openmv.com |
|---|---|
| version |
$Id: c7a3e7eff0b94828f9ec634c3612d89f2740fead $ |
| package |
phing.tasks.ext |
| since | 2.4.0 |
| link |
http://ant.apache.org/manual/CoreTasks/xmlproperty.html |
setFile($file)
getFile()
setPrefix(string $prefix) : void
A "." is appended to the prefix if not specified.
| since | 2.0 |
|---|
stringprefix string
getPrefix() : string
| since | 2.0 |
|---|
string
setKeepRoot(bool $yesNo)
bool
getKeepRoot() : bool
bool
setCollapseAttributes(bool $yesNo)
bool
getCollapseAttributes() : bool
bool
setDelimiter(string $d)
string
getDelimiter() : string
string
setRequired(string $d)
string
getRequired() : string
string
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
_getProperties(string $filePath) : \Properties
_addNode(\SimpleXMLElement $node, array $path, \Properties $prop) : void
\SimpleXMLElement
arrayPath to this node
setName($name)
getName()
setValue($value)
addText($value)
| since | 2.2.0 |
|---|
getValue()
getRefid()
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 |
|---|
objectThe created filterchain object
loadEnvironment(string $prefix)
stringprefix to place before them
addProperties($props)
addProperty(string $name, string $value)
stringname of property
stringvalue 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.
stringThe string to be scanned for property references
setOwningTarget(\Target $target)
getOwningTarget() : \Target
getTaskName() : string
stringName of this task
setTaskName(string $name) : string
string
stringA string representing the name of this task for log
getTaskType() : string
stringThe type of this task (XML Tag)
setTaskType($name)
getRegisterSlot(string $slotName)
string
log(string $msg, integer $level = \Project::MSG_INFO)
stringThe message to be logged.
integerThe message's priority at this message should have
setDescription(string $desc)
stringThe text describing the task
getDescription() : string
stringThe 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
_keepRoot :
_collapseAttr :
_delimiter :
_required :
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