You are here

function hosting_server_invoke_services in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 server/hosting_server.module \hosting_server_invoke_services()
  2. 7.3 server/hosting_server.module \hosting_server_invoke_services()

Invoke a method on all enabled services.

6 calls to hosting_server_invoke_services()
hosting_nodeapi_server_delete_revision in server/hosting_server.module
Implements hook_delete_revision().
hosting_server_delete in server/hosting_server.module
Implements hook_delete().
hosting_server_insert in server/hosting_server.module
Implements hook_insert().
hosting_server_load in server/hosting_server.module
Implements hook_load().
hosting_server_update in server/hosting_server.module
Implements hook_update().

... See full list

File

server/hosting_server.module, line 327

Code

function hosting_server_invoke_services(&$node, $method, &$arg1 = NULL, &$arg2 = NULL, &$arg3 = NULL, &$arg4 = NULL) {
  $return = array();
  foreach ($node->services as $name => $service) {
    $result = $service
      ->{$method}($arg1, $arg2, $arg3, $arg4);
    if (isset($result) && is_array($result)) {
      $return = array_merge_recursive($return, $result);
    }
    elseif (isset($result)) {
      $return[] = $result;
    }
  }
  return $return;
}