You are here

function hosting_server_invoke_services in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 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
Implementation of hook_delete_revision().
hosting_server_delete in server/hosting_server.module
Implementation of hook_delete().
hosting_server_insert in server/hosting_server.module
Implementation of hook_insert().
hosting_server_load in server/hosting_server.module
Implementation of hook_load().
hosting_server_update in server/hosting_server.module
Implementation of hook_update().

... See full list

File

server/hosting_server.module, line 193

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);
    }
    else {
      if (isset($result)) {
        $return[] = $result;
      }
    }
  }
  return $return;
}