/** * Main method that starts the command line runner. * * @return integer The exit code. */ public static function main() { $command = new Command(); return $command->run(); }
/** * Executes the text ui command and returns the exit code and the output as * an array <b>array($exitCode, $output)</b>. * * @param array $argv The cli parameters. * * @return array(mixed) */ private function executeCommand(array $argv = null) { $this->prepareArgv($argv); ob_start(); $command = new Command(); $exitCode = $command->run(); $output = ob_get_contents(); ob_end_clean(); return array($exitCode, $output); }