Exemplo n.º 1
0
 /**
  * Runs a Git command and captures the output.
  *
  * @param array $args
  *   The arguments passed to the command method.
  * @param boolean $setDirectory
  *   Set the working directory, defaults to true.
  *
  * @return \GitWrapper\GitWorkingCopy
  *
  * @throws \GitWrapper\GitException
  *
  * @see GitWrapper::run()
  */
 public function run($args, $setDirectory = true)
 {
     $command = call_user_func_array(array('GitWrapper\\GitCommand', 'getInstance'), $args);
     if ($setDirectory) {
         $command->setDirectory($this->directory);
     }
     $this->output .= $this->wrapper->run($command);
     return $this;
 }