src/bbn/api/cloudmin.php
public function generate($command){
    $perl_cmd = str_replace('_', '-', $command);
    if ( isset($this->commands[$perl_cmd]) ){
      $cmd = $this->commands[$perl_cmd];
      $st = '$vm->'.$command.'(['.PHP_EOL;
      foreach ( $cmd['args'] as $k => $v ){
        $st .= "'$k' => ".($v['binary'] ? '0' : "''").PHP_EOL;
      }
      $st .= ']);';
      return $st;
    }
    return false;
  }
public function generate($command){
    $perl_cmd = str_replace('_', '-', $command);
    if ( isset($this->commands[$perl_cmd]) ){
      $cmd = $this->commands[$perl_cmd];
      $st = '$vm->'.$command.'(['.PHP_EOL;
      foreach ( $cmd['args'] as $k => $v ){
        $st .= "'$k' => ".($v['binary'] ? '0' : "''").PHP_EOL;
      }
      $st .= ']);';
      return $st;
    }
    return false;
  }
public function generate ( $ command ) { $ perl_cmd = str_replace ( '_' , '-' , $ command ) ; if ( isset ( $ this -> commands [ $ perl_cmd ] ) ) { $ cmd = $ this -> commands [ $ perl_cmd ] ; $ st = '$vm->' . $ command . '([' . PHP_EOL ; foreach ( $ cmd [ 'args' ] as $ k => $ v ) { $ st .= "'$k' => " . ( $ v [ 'binary' ] ? '0' : "''" ) . PHP_EOL ; } $ st .= ']);' ; return $ st ; } return false ; }
Returns a string of PHP code for executing a given command with all its possible parameters pre-populated
@param $command
@return bool|string
Returns a string of PHP code for executing a given command with all its possible parameters pre - populated