protected static function ClientsServicesDrupal::fetch in Web Service Clients 6
Gets raw data from service call
1 call to ClientsServicesDrupal::fetch()
- ClientsServicesDrupal::call in backends/
clients_drupal/ clients_drupal.inc - Executes call and processes data
File
- backends/
clients_drupal/ clients_drupal.inc, line 91 - Defines methods and calls to Drupal services
Class
Code
protected static function fetch($connection, $resource, $user) {
$cacheid = md5($connection->name . implode($resource->configuration['options']));
// user is stdClass if xmlrpc_error()...
if (!is_array($user) || !isset($user['sessid'])) {
// @todo watchdog
drupal_set_message($user->message, 'error');
return;
}
$token = self::getToken($connection, $resource->configuration['options']['method']);
// catch empty arguments
$arguments = array_values($resource->configuration['options']['arguments']);
$arguments = trim($arguments[0]) != '' ? $arguments : array();
$result = parent::doCall('xmlrpc', $cacheid, $connection->endpoint, $resource->configuration['options']['method'], $token['hash'], $token['domain'], $token['timestamp'], $token['nonce'], $user['sessid'], $resource->configuration['options']['view'], NULL, $arguments, (int) $resource->configuration['options']['offset'], (int) $resource->configuration['options']['limit']);
return $result;
}