You are here

function drd_server_result in Drupal Remote Dashboard Server 6

Same name and namespace in other branches
  1. 6.2 drd_server.module \drd_server_result()
  2. 7.2 drd_server.module \drd_server_result()
  3. 7 drd_server.module \drd_server_result()

Prepare the result for returning it to the XMLRPC caller.

Parameters

$mode: The function that was called by the XMLRPC caller.

$drd_result: The result from the drd_server functions to be returned after hooks and alterers have been called.

$args: More arguments if available and/or required.

Return value

Returns the final result to be sent to the XMLRPC caller.

14 calls to drd_server_result()
drd_server_check_api in ./drd_server.module
======================================================================
drd_server_check_session in ./drd_server.module
drd_server_connect in ./drd_server.module
drd_server_domain_flush_cache in ./drd_server.domain.inc
drd_server_domain_info in ./drd_server.domain.inc

... See full list

File

./drd_server.module, line 131

Code

function drd_server_result() {
  $args = func_get_args();
  $mode = $args[0];
  $drd_result = $args[1];
  unset($args[0], $args[1]);
  foreach (module_implements('drd_server') as $module) {
    $drd_result = module_invoke($module, 'drd_server', $mode, $drd_result, $args);
  }
  drupal_alter('drd_server', $mode, $drd_result);
  $result = new stdClass();
  $result->is_error = FALSE;
  $result->message = $drd_result;
  return drupal_json_encode($result);
}