. */ require_once 'phing/ProjectComponent.php'; require_once 'phing/tasks/system/condition/Condition.php'; /** * Condition that tests whether a given string evals to true. * * @author Hans Lellelid (Phing) * @author Steve Loughran (Ant) * @package phing.tasks.system.condition */ class IsTrueCondition extends ProjectComponent implements Condition { /** * what we eval */ private $value; /** * Set the value to be tested. * @param boolean $value */ public function setValue($value) { $this->value = $value; } /** * return the inverted value; * @throws BuildException if someone forgot to spec a value */ public function evaluate() { if ($this->value === null) { throw new BuildException("Nothing to test for falsehood"); } return $this->value; } }