public function run($input = '', $output = null)
    {
        $this->loadComposerPhar(false);
        if (!$this->application) {
            $this->application = new \Composer\Console\Application();
            $this->application->setAutoExit(false);
        }

        $cli_args = is_string($input) && !empty($input) ?
                new \Symfony\Component\Console\Input\StringInput($input) :
                null;

        $argv0 = $_SERVER['argv'][0];
        $this->fixSelfupdate($cli_args);

        $exitcode = $this->application->run(
            $cli_args,
            $output
        );
        $_SERVER['argv'][0] = $argv0;

        return $exitcode;
    }
public function run($input = '', $output = null)
    {
        $this->loadComposerPhar(false);
        if (!$this->application) {
            $this->application = new \Composer\Console\Application();
            $this->application->setAutoExit(false);
        }

        $cli_args = is_string($input) && !empty($input) ?
                new \Symfony\Component\Console\Input\StringInput($input) :
                null;

        $argv0 = $_SERVER['argv'][0];
        $this->fixSelfupdate($cli_args);

        $exitcode = $this->application->run(
            $cli_args,
            $output
        );
        $_SERVER['argv'][0] = $argv0;

        return $exitcode;
    }
public function run ( $ input = '' , $ output = null ) { $ this -> loadComposerPhar ( false ) ; if ( ! $ this -> application ) { $ this -> application = new \ Composer \ Console \ Application ( ) ; $ this -> application -> setAutoExit ( false ) ; } $ cli_args = is_string ( $ input ) && ! empty ( $ input ) ? new \ Symfony \ Component \ Console \ Input \ StringInput ( $ input ) : null ; $ argv0 = $ _SERVER [ 'argv' ] [ 0 ] ; $ this -> fixSelfupdate ( $ cli_args ) ; $ exitcode = $ this -> application -> run ( $ cli_args , $ output ) ; $ _SERVER [ 'argv' ] [ 0 ] = $ argv0 ; return $ exitcode ; }
Run this composer wrapper as a command-line application.

@param  string  $input  command line arguments
@param  object  $output output object
@return integer 0 if everything went fine, or an error code
@see http://api.symfony.com/2.2/Symfony/Component/Console/Application.html#method_run
Run this composer wrapper as a command - line application .