Esempio n. 1
0
 /**
  * Execute the db command
  * @param string $command The command to invoke
  * @param array $args The command arguments
  * @param string &$output The output from the command process
  * @return int  The command exit code
  */
 private function dbExec($command, $args, &$output)
 {
     // prepend the database name and command
     array_unshift($args, $this->db, $command);
     $exitCode = 0;
     $oArr = array();
     $this->phpWrapper->exec($this->command . ' ' . implode(' ', array_map('escapeshellarg', $args)), $oArr, $exitCode);
     $output = implode("\n", $oArr);
     return $exitCode;
 }