private function execCommand(array $command): array
  {
    $this->logVerbose('Execute: %s', implode(' ', $command));
    list($output, $ret) = ProgramExecution::exec1($command, null);
    if ($ret!=0)
    {
      foreach ($output as $line)
      {
        $this->logInfo($line);
      }
      $this->logError("Error executing '%s'.", implode(' ', $command));
    }
    else
    {
      foreach ($output as $line)
      {
        $this->logVerbose($line);
      }
    }

    return $output;
  }
private function execCommand(array $command): array
  {
    $this->logVerbose('Execute: %s', implode(' ', $command));
    list($output, $ret) = ProgramExecution::exec1($command, null);
    if ($ret!=0)
    {
      foreach ($output as $line)
      {
        $this->logInfo($line);
      }
      $this->logError("Error executing '%s'.", implode(' ', $command));
    }
    else
    {
      foreach ($output as $line)
      {
        $this->logVerbose($line);
      }
    }

    return $output;
  }
private function execCommand ( array $ command ) : array { $ this -> logVerbose ( 'Execute: %s' , implode ( ' ' , $ command ) ) ; list ( $ output , $ ret ) = ProgramExecution :: exec1 ( $ command , null ) ; if ( $ ret != 0 ) { foreach ( $ output as $ line ) { $ this -> logInfo ( $ line ) ; } $ this -> logError ( "Error executing '%s'." , implode ( ' ' , $ command ) ) ; } else { foreach ( $ output as $ line ) { $ this -> logVerbose ( $ line ) ; } } return $ output ; }
Executes an external program.

@param string[] $command The command as array.

@return string[] The output of the command.
Executes an external program .