private function queueOperation($http_verb, $id, $method, $args = null)
    {
        $operation = array(
            'operation_id' => $id,
            'method'       => $http_verb,
            'path'         => $method,
        );

        if ($args) {
            if ($http_verb == 'GET') {
                $key             = 'params';
                $operation[$key] = $args;
            } else {
                $key             = 'body';
                $operation[$key] = json_encode($args);
            }
        }

        $this->operations[] = $operation;
    }
private function queueOperation($http_verb, $id, $method, $args = null)
    {
        $operation = array(
            'operation_id' => $id,
            'method'       => $http_verb,
            'path'         => $method,
        );

        if ($args) {
            if ($http_verb == 'GET') {
                $key             = 'params';
                $operation[$key] = $args;
            } else {
                $key             = 'body';
                $operation[$key] = json_encode($args);
            }
        }

        $this->operations[] = $operation;
    }
private function queueOperation ( $ http_verb , $ id , $ method , $ args = null ) { $ operation = array ( 'operation_id' => $ id , 'method' => $ http_verb , 'path' => $ method , ) ; if ( $ args ) { if ( $ http_verb == 'GET' ) { $ key = 'params' ; $ operation [ $ key ] = $ args ; } else { $ key = 'body' ; $ operation [ $ key ] = json_encode ( $ args ) ; } } $ this -> operations [ ] = $ operation ; }
Add an operation to the internal queue.

@param   string $http_verb GET, POST, PUT, PATCH or DELETE
@param   string $id        ID for the operation within the batch
@param   string $method    URL of the API request method
@param   array  $args      Assoc array of arguments (usually your data)

@return  void
Add an operation to the internal queue .