You are here

function hosting_server_invoke_services in Hostmaster (Aegir) 6

Invoke a method on all enabled services.

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

... See full list

File

modules/hosting/server/hosting_server.module, line 189

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;
}