You are here

function _variable_realm_hook in Variable 7.2

Invokes all realm controllers that implement a method.

Parameters

$method: Method name

$arg1, $arg2...: Variable number of arguments to pass to the method.

2 calls to _variable_realm_hook()
variable_realm_initialize in variable_realm/variable_realm.module
Initialize realm and set key depending on request.
variable_realm_switch in variable_realm/variable_realm.module
Switch current variable realms.

File

variable_realm/variable_realm.module, line 529
Variable API module - Realms

Code

function _variable_realm_hook() {
  $args = func_get_args();
  $method = array_shift($args);
  $result = array();
  foreach (variable_realm_controller() as $realm_name => $realm_controller) {
    if (method_exists($realm_controller, $method)) {
      $result[$realm_name] = call_user_func_array(array(
        $realm_controller,
        $method,
      ), $args);
    }
  }
  return $result;
}