function _domain_bootstrap_invoke_all in Domain Access 7.2
Same name and namespace in other branches
- 6.2 domain.bootstrap.inc \_domain_bootstrap_invoke_all()
- 7.3 domain.bootstrap.inc \_domain_bootstrap_invoke_all()
Tries to call specified hook on all domain_bootstrap modules.
The hook function names are of the following format: {$module}_domain_bootstrap_{$hook} where {$module} is the name of the module implementing the hook and {$hook} is the identifier for the concrete domain bootstrap hook.
This function is basically a copy of module_invoke_all() adjusted to our needs.
@link http://api.drupal.org/api/function/module_invoke_all/6
3 calls to _domain_bootstrap_invoke_all()
- domain_lookup_simple in ./
domain.module - Determines a domain_id matching given $_name.
- domain_set_domain in ./
domain.module - Set the active domain to something other than the HTTP request.
- _domain_bootstrap in ./
domain.bootstrap.inc - Calls individual bootstrap phases.
File
- ./
domain.bootstrap.inc, line 219 - Domain bootstrap file.
Code
function _domain_bootstrap_invoke_all() {
$args = func_get_args();
$hook = $args[0];
unset($args[0]);
$return = array();
foreach (_domain_bootstrap_modules() as $module) {
$function = $module . '_domain_bootstrap_' . $hook;
if (function_exists($function)) {
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
}
}
return $return;
}