run() public méthode

Performs the main cli process and returns the exit code.
public run ( ) : integer
Résultat integer
Exemple #1
0
 /**
  * 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);
 }