Ejemplo n.º 1
0
 public function params_to_options($parameters)
 {
     // Turn each parameter into a valid parameter string.
     $parameter_strings = array();
     foreach ($parameters as $key => $value) {
         // Only escape the values, not the keys or the rest of the string.
         $value = drush_escapeshellarg($value);
         $parameter_strings[] = "--{$key}={$value}";
     }
     // Join the parameters and return.
     return implode(' ', $parameter_strings);
 }
Ejemplo n.º 2
0
 /**
  * Generate command to commit all code changes.
  *
  * @param string $message
  *   The git commit message.
  *
  * @return string
  *   The git command.
  */
 public function vcsCommitCommand($message)
 {
     return 'cd ' . $this->getCodepath() . ' && git add --all . && git commit -m ' . drush_escapeshellarg($message);
 }