You are here

function hook_wsclient_service_load in Web service client 7

Act on web service descriptions being loaded from the database.

This hook is invoked during web service description loading, which is handled by entity_load(), via the EntityCRUDController.

Parameters

$services: An array of web service descriptions being loaded, keyed by id.

File

./wsclient.api.php, line 62
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document web service descriptions in the standard Drupal manner.

Code

function hook_wsclient_service_load($services) {
  $result = db_query('SELECT id, foo FROM {mytable} WHERE id IN(:ids)', array(
    ':ids' => array_keys($services),
  ));
  foreach ($result as $record) {
    $services[$record->id]->foo = $record->foo;
  }
}