. */ require_once 'phing/ProjectComponent.php'; require_once 'phing/tasks/system/condition/Condition.php'; /** * Condition that tests whether a given property has been set. * * @author Hans Lellelid (Phing) * @author Stefan Bodewig (Ant) * @version $Revision: 905 $ * @package phing.tasks.system.condition */ class IsSetCondition extends ProjectComponent implements Condition { private $property; public function setProperty($p) { $this->property = $p; } /** * Check whether property is set. * @throws BuildException */ public function evaluate() { if ($this->property === null) { throw new BuildException("No property specified for isset " . "condition"); } return $this->project->getProperty($this->property) !== null; } }