Task definition for the phing task to switch on a particular value.
Task calling syntax:
<switch value="value" [caseinsensitive="true|false"] >
<case value="val">
<property name="propname" value="propvalue" /> |
<phingcall target="targetname" /> |
any other tasks
</case>
[
<default>
<property name="propname" value="propvalue" /> |
<phingcall target="targetname" /> |
any other tasks
</default>
]
</switch>
Attributes: value -> The value to switch on caseinsensitive -> Should we do case insensitive comparisons? (default is false)
Subitems: case --> An individual case to consider, if the value that is being switched on matches to value attribute of the case, then the nested tasks will be executed. default --> The default case for when no match is found.
Crude Example:
<switch value="${foo}">
<case value="bar">
<echo message="The value of property foo is bar" />
</case>
<case value="baz">
<echo message="The value of property foo is baz" />
</case>
<default>
<echo message="The value of property foo is not sensible" />
</default>
</switch>
author |
Siad Ardroumli siad.ardroumli@gmail.com |
---|---|
package |
phing.tasks.system |
getDescription() : string
string
The text description of the task
getLocation() : \Location
getOwningTarget() : \Target
getProject() : \Project
getRegisterSlot(string $slotName) : \RegisterSlot
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getTaskName() : string
string
Name of this task
getTaskType() : string
string
The type of this task (XML Tag)
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws | |
---|---|
log(string $msg, integer $level = \Project::MSG_INFO) : void
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
perform()
throws | |
---|---|
setCaseInsensitive( $bool) : void
setDescription(string $desc)
string
The text describing the task
setLocation(\Location $location)
setOwningTarget(\Target $target)
setProject(\Project $project) : void
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
setValue( $value)
value : mixed
var |
---|
mixed
cases : array
var |
---|
array
caseInsensitive : boolean
var |
---|
boolean
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project