You are here

protected function ServicesClientConnection::createRequest in Services Client 7.2

Same name and namespace in other branches
  1. 7 services_client_connection/include/connection.inc \ServicesClientConnection::createRequest()

Helper method for creating

Parameters

array $options: Options for Request. @see ServicesClientConnectionRequest for all keys that can be passed. Each request attribute can be passed as option key.

Return value

ServicesClientConnectionHttpRequest Initialized request

9 calls to ServicesClientConnection::createRequest()
ServicesClientConnection::action in services_client_connection/include/connection.inc
Execute action on remote resource
ServicesClientConnection::create in services_client_connection/include/connection.inc
Create data on remote endpoint.
ServicesClientConnection::delete in services_client_connection/include/connection.inc
Delete data from remote endpoint.
ServicesClientConnection::get in services_client_connection/include/connection.inc
Retrieve data from remote endpoint.
ServicesClientConnection::httpRequest in services_client_connection/include/connection.inc
Make low level HTTP request which allows to make calls to non-services REST only endpoints.

... See full list

File

services_client_connection/include/connection.inc, line 125
Main services client connection class which exposes simple API

Class

ServicesClientConnection
@file Main services client connection class which exposes simple API

Code

protected function createRequest($options = array()) {

  // Create new request
  $request = new ServicesClientConnectionHttpRequest();

  // Set options
  foreach ($options as $key => $val) {
    if (property_exists($request, $key)) {
      $request->{$key} = $val;
    }
  }
  return $request;
}