You are here

function clients_connection_base::__construct in Web Service Clients 7

Same name and namespace in other branches
  1. 6.2 clients.inc \clients_connection_base::__construct()
  2. 7.2 clients.inc \clients_connection_base::__construct()

Constructor method.

Parameters

$connection_data: An object containing connection data, as returned from clients_connection_load().

1 call to clients_connection_base::__construct()
clients_connection_drupal_services::__construct in backends/clients_drupal/clients_drupal.inc
Constructor method.
1 method overrides clients_connection_base::__construct()
clients_connection_drupal_services::__construct in backends/clients_drupal/clients_drupal.inc
Constructor method.

File

./clients.inc, line 34
Base class for backends. Handles XML-RPC, REST calls and caching results

Class

clients_connection_base
Base class for Client connections.

Code

function __construct($connection_data) {

  // Set the connection properties.
  // TODO: incoming $connection_data should change to an array in due course.
  foreach (array(
    'name',
    'cid',
    'endpoint',
    'configuration',
    'type',
  ) as $property) {
    $this->{$property} = $connection_data->{$property};
  }
}