public function executeNanbando($command, array $parameter, callable $callback = null)
    {
        $this->login();

        $parameterString = [];
        foreach ($parameter as $key => $value) {
            if (!is_array($value)) {
                $value = [$value];
            }

            foreach ($value as $item) {
                $parameterString[] = trim((is_string($key) ? $key . ' ' : '') . $item);
            }
        }

        return $this->execute(
            sprintf('%s %s %s', $this->executable, $command, implode(' ', $parameterString)),
            $callback
        );
    }
public function executeNanbando($command, array $parameter, callable $callback = null)
    {
        $this->login();

        $parameterString = [];
        foreach ($parameter as $key => $value) {
            if (!is_array($value)) {
                $value = [$value];
            }

            foreach ($value as $item) {
                $parameterString[] = trim((is_string($key) ? $key . ' ' : '') . $item);
            }
        }

        return $this->execute(
            sprintf('%s %s %s', $this->executable, $command, implode(' ', $parameterString)),
            $callback
        );
    }
public function executeNanbando ( $ command , array $ parameter , callable $ callback = null ) { $ this -> login ( ) ; $ parameterString = [ ] ; foreach ( $ parameter as $ key => $ value ) { if ( ! is_array ( $ value ) ) { $ value = [ $ value ] ; } foreach ( $ value as $ item ) { $ parameterString [ ] = trim ( ( is_string ( $ key ) ? $ key . ' ' : '' ) . $ item ) ; } } return $ this -> execute ( sprintf ( '%s %s %s' , $ this -> executable , $ command , implode ( ' ' , $ parameterString ) ) , $ callback ) ; }
Executes nanbando command on connected server.

@param $command
@param array $parameter
@param callable|null $callback

@return string
Executes nanbando command on connected server .