. */ require_once 'phing/Task.php'; require_once 'phing/TaskContainer.php'; /** * Sequential is a container task that contains other Phing Task objects. * * The sequential task has no attributes and does not support any nested * elements apart from Ant tasks. Any valid Ant task may be embedded within the * sequential task. * * @since 2.1.2 * @package phing.tasks.system */ class SequentialTask extends Task implements TaskContainer { /** Optional Vector holding the nested tasks */ private $nestedTasks = array(); /** * Add a nested task to Sequential. * @param Task $nestedTask Nested task to execute Sequential */ public function addTask(Task $nestedTask) { $this->nestedTasks[] = $nestedTask; } /** * Execute all nestedTasks. * @throws BuildException if one of the nested tasks fails. */ public function main() { foreach($this->nestedTasks as $task) { $task->perform(); } } }