classes/phing/Phing.php
public static function start($args, array $additionalUserProperties = null)
    {
        try {
            $m = new Phing();
            $m->execute($args);
        } catch (Exception $exc) {
            self::handleLogfile();
            self::printMessage($exc);
            self::statusExit(1);
            return;
        }

        if ($additionalUserProperties !== null) {
            foreach ($additionalUserProperties as $key => $value) {
                $m::setDefinedProperty($key, $value);
            }
        }

        // expect the worst
        $exitCode = 1;
        try {
            try {
                $m->runBuild();
                $exitCode = 0;
            } catch (ExitStatusException $ese) {
                $exitCode = $ese->getCode();
                if ($exitCode !== 0) {
                    self::handleLogfile();
                    throw $ese;
                }
            }
        } catch (BuildException $exc) {
            // avoid printing output twice: self::printMessage($exc);
        } catch (Throwable $exc) {
            self::printMessage($exc);
        } finally {
            self::handleLogfile();
        }
        self::statusExit($exitCode);
    }
public static function start($args, array $additionalUserProperties = null)
    {
        try {
            $m = new Phing();
            $m->execute($args);
        } catch (Exception $exc) {
            self::handleLogfile();
            self::printMessage($exc);
            self::statusExit(1);
            return;
        }

        if ($additionalUserProperties !== null) {
            foreach ($additionalUserProperties as $key => $value) {
                $m::setDefinedProperty($key, $value);
            }
        }

        // expect the worst
        $exitCode = 1;
        try {
            try {
                $m->runBuild();
                $exitCode = 0;
            } catch (ExitStatusException $ese) {
                $exitCode = $ese->getCode();
                if ($exitCode !== 0) {
                    self::handleLogfile();
                    throw $ese;
                }
            }
        } catch (BuildException $exc) {
            // avoid printing output twice: self::printMessage($exc);
        } catch (Throwable $exc) {
            self::printMessage($exc);
        } finally {
            self::handleLogfile();
        }
        self::statusExit($exitCode);
    }
public static function start ( $ args , array $ additionalUserProperties = null ) { try { $ m = new Phing ( ) ; $ m -> execute ( $ args ) ; } catch ( Exception $ exc ) { self :: handleLogfile ( ) ; self :: printMessage ( $ exc ) ; self :: statusExit ( 1 ) ; return ; } if ( $ additionalUserProperties !== null ) { foreach ( $ additionalUserProperties as $ key => $ value ) { $ m :: setDefinedProperty ( $ key , $ value ) ; } } // expect the worst $ exitCode = 1 ; try { try { $ m -> runBuild ( ) ; $ exitCode = 0 ; } catch ( ExitStatusException $ ese ) { $ exitCode = $ ese -> getCode ( ) ; if ( $ exitCode !== 0 ) { self :: handleLogfile ( ) ; throw $ ese ; } } } catch ( BuildException $ exc ) { // avoid printing output twice: self::printMessage($exc); } catch ( Throwable $ exc ) { self :: printMessage ( $ exc ) ; } finally { self :: handleLogfile ( ) ; } self :: statusExit ( $ exitCode ) ; }
Entry point allowing for more options from other front ends.

This method encapsulates the complete build lifecycle.

@param  array $args The commandline args passed to phing shell script.
@param  array $additionalUserProperties Any additional properties to be passed to Phing (alternative front-end might implement this).
These additional properties will be available using the getDefinedProperty() method and will
be added to the project's "user" properties
@see    execute()
@see    runBuild()
@throws Exception - if there is an error during build
Entry point allowing for more options from other front ends .