public function setOptions(array $options) {
    foreach ($options as $key => $value) {
      if (is_int($key)) {
        $option  = '--' . $value;
      }
      elseif (strlen($key) == 1) {
        $option = '-' . $key;
        if (!empty($value)) {
          $option .= ' ' . escapeshellarg($value);
        }
      }
      else {
        // Do not render --uri=default.
        if ($key == 'uri' && $value == 'default') {
          continue;
        }
        $option = '--' . $key;
        if (!empty($value)) {
          $option .= '=' . escapeshellarg($value);
        }
      }
      if (!in_array($option, $this->options)) {
        $this->options[] = $option;
      }
    }
    return $this;
  }
public function setOptions(array $options) {
    foreach ($options as $key => $value) {
      if (is_int($key)) {
        $option  = '--' . $value;
      }
      elseif (strlen($key) == 1) {
        $option = '-' . $key;
        if (!empty($value)) {
          $option .= ' ' . escapeshellarg($value);
        }
      }
      else {
        // Do not render --uri=default.
        if ($key == 'uri' && $value == 'default') {
          continue;
        }
        $option = '--' . $key;
        if (!empty($value)) {
          $option .= '=' . escapeshellarg($value);
        }
      }
      if (!in_array($option, $this->options)) {
        $this->options[] = $option;
      }
    }
    return $this;
  }
public function setOptions ( array $ options ) { foreach ( $ options as $ key => $ value ) { if ( is_int ( $ key ) ) { $ option = '--' . $ value ; } elseif ( strlen ( $ key ) == 1 ) { $ option = '-' . $ key ; if ( ! empty ( $ value ) ) { $ option .= ' ' . escapeshellarg ( $ value ) ; } } else { // Do not render --uri=default. if ( $ key == 'uri' && $ value == 'default' ) { continue ; } $ option = '--' . $ key ; if ( ! empty ( $ value ) ) { $ option .= '=' . escapeshellarg ( $ value ) ; } } if ( ! in_array ( $ option , $ this -> options ) ) { $ this -> options [ ] = $ option ; } } return $ this ; }
Set drush options.
Set drush options .