src/Cli/BaseTask.php
public function main($argv)
    {
        $this->addArguments();
        try {
            $this->cli->arguments->parse($argv);
        } catch (\Exception $e) {
            $this->cli->usage();
            return 0;
        }
        if ($this->cli->arguments->get('help')) {
            $this->cli->usage();
            return 0;
        }
        return $this->execute();
    }
public function main($argv)
    {
        $this->addArguments();
        try {
            $this->cli->arguments->parse($argv);
        } catch (\Exception $e) {
            $this->cli->usage();
            return 0;
        }
        if ($this->cli->arguments->get('help')) {
            $this->cli->usage();
            return 0;
        }
        return $this->execute();
    }
public function main ( $ argv ) { $ this -> addArguments ( ) ; try { $ this -> cli -> arguments -> parse ( $ argv ) ; } catch ( \ Exception $ e ) { $ this -> cli -> usage ( ) ; return 0 ; } if ( $ this -> cli -> arguments -> get ( 'help' ) ) { $ this -> cli -> usage ( ) ; return 0 ; } return $ this -> execute ( ) ; }
Execute the task given a set of CLI arguments.

@param array $argv The arguments to use.
@return int
Execute the task given a set of CLI arguments .