classes/phing/ComponentHelper.php
public function createCondition($conditionType)
    {
        try {
            $classname = "";
            $tasklwr = strtolower($conditionType);
            foreach ($this->typedefs as $name => $class) {
                if (strtolower($name) === $tasklwr) {
                    $classname = $class;
                    break;
                }
            }

            if ($classname === "") {
                return null;
            }

            $o = $this->createObject($classname);

            if ($o instanceof Condition) {
                return $o;
            } else {
                throw new BuildException("Not actually a condition");
            }
        } catch (Exception $e) {
            throw new BuildException("Could not create condition of type: " . $conditionType, $e);
        }
    }
public function createCondition($conditionType)
    {
        try {
            $classname = "";
            $tasklwr = strtolower($conditionType);
            foreach ($this->typedefs as $name => $class) {
                if (strtolower($name) === $tasklwr) {
                    $classname = $class;
                    break;
                }
            }

            if ($classname === "") {
                return null;
            }

            $o = $this->createObject($classname);

            if ($o instanceof Condition) {
                return $o;
            } else {
                throw new BuildException("Not actually a condition");
            }
        } catch (Exception $e) {
            throw new BuildException("Could not create condition of type: " . $conditionType, $e);
        }
    }
public function createCondition ( $ conditionType ) { try { $ classname = "" ; $ tasklwr = strtolower ( $ conditionType ) ; foreach ( $ this -> typedefs as $ name => $ class ) { if ( strtolower ( $ name ) === $ tasklwr ) { $ classname = $ class ; break ; } } if ( $ classname === "" ) { return null ; } $ o = $ this -> createObject ( $ classname ) ; if ( $ o instanceof Condition ) { return $ o ; } else { throw new BuildException ( "Not actually a condition" ) ; } } catch ( Exception $ e ) { throw new BuildException ( "Could not create condition of type: " . $ conditionType , $ e ) ; } }
Creates a new condition and returns the reference to it

@param  string $conditionType
@return Condition
@throws BuildException
Creates a new condition and returns the reference to it