You are here

function _authcache_invoke_hook in Authenticated User Page Caching (Authcache) 6

Same name and namespace in other branches
  1. 7 authcache.helpers.inc \_authcache_invoke_hook()

Helper function: Invoke hook_$hook() in all modules; merge recursively.

Similar to module_invoke_all(), except $var is passed by reference.

1 call to _authcache_invoke_hook()
_authcache_shutdown_save_page in ./authcache.helpers.inc
Save page to cache

File

./authcache.helpers.inc, line 334
Helper functions for the Authcache module (no Drupal hooks here).

Code

function _authcache_invoke_hook($hook, &$var) {
  foreach (module_implements($hook) as $name) {
    $function = "{$name}_{$hook}";
    $result = $function();
    if (isset($result) && is_array($result)) {
      $var = array_merge_recursive($var, $result);
    }
  }
}