classes/phing/tasks/system/ConditionTask.php
public function main()
    {
        if ($this->countConditions() > 1) {
            throw new BuildException(
                "You must not nest more than one condition into <condition>"
            );
        }
        if ($this->countConditions() < 1) {
            throw new BuildException(
                "You must nest a condition into <condition>"
            );
        }
        if ($this->property === null) {
            throw new BuildException('The property attribute is required.');
        }
        $cs = $this->getIterator();
        if ($cs->current()->evaluate()) {
            $this->log("Condition true; setting " . $this->property . " to " . $this->value, Project::MSG_DEBUG);
            $this->project->setNewProperty($this->property, $this->value);
        } elseif ($this->alternative !== null) {
            $this->log("Condition false; setting " . $this->property . " to " . $this->alternative, Project::MSG_DEBUG);
            $this->project->setNewProperty($this->property, $this->alternative);
        } else {
            $this->log('Condition false; not setting ' . $this->property, Project::MSG_DEBUG);
        }
    }
public function main()
    {
        if ($this->countConditions() > 1) {
            throw new BuildException(
                "You must not nest more than one condition into <condition>"
            );
        }
        if ($this->countConditions() < 1) {
            throw new BuildException(
                "You must nest a condition into <condition>"
            );
        }
        if ($this->property === null) {
            throw new BuildException('The property attribute is required.');
        }
        $cs = $this->getIterator();
        if ($cs->current()->evaluate()) {
            $this->log("Condition true; setting " . $this->property . " to " . $this->value, Project::MSG_DEBUG);
            $this->project->setNewProperty($this->property, $this->value);
        } elseif ($this->alternative !== null) {
            $this->log("Condition false; setting " . $this->property . " to " . $this->alternative, Project::MSG_DEBUG);
            $this->project->setNewProperty($this->property, $this->alternative);
        } else {
            $this->log('Condition false; not setting ' . $this->property, Project::MSG_DEBUG);
        }
    }
public function main ( ) { if ( $ this -> countConditions ( ) > 1 ) { throw new BuildException ( "You must not nest more than one condition into <condition>" ) ; } if ( $ this -> countConditions ( ) < 1 ) { throw new BuildException ( "You must nest a condition into <condition>" ) ; } if ( $ this -> property === null ) { throw new BuildException ( 'The property attribute is required.' ) ; } $ cs = $ this -> getIterator ( ) ; if ( $ cs -> current ( ) -> evaluate ( ) ) { $ this -> log ( "Condition true; setting " . $ this -> property . " to " . $ this -> value , Project :: MSG_DEBUG ) ; $ this -> project -> setNewProperty ( $ this -> property , $ this -> value ) ; } elseif ( $ this -> alternative !== null ) { $ this -> log ( "Condition false; setting " . $ this -> property . " to " . $ this -> alternative , Project :: MSG_DEBUG ) ; $ this -> project -> setNewProperty ( $ this -> property , $ this -> alternative ) ; } else { $ this -> log ( 'Condition false; not setting ' . $ this -> property , Project :: MSG_DEBUG ) ; } }
See whether our nested condition holds and set the property.

@throws BuildException
@return void
See whether our nested condition holds and set the property .