public static function HookStub::record in Authenticated User Page Caching (Authcache) 7.2
Record one invocation.
Parameters
string $hookname: The fully qualified name of a function in a stub-module.
Return value
any A value specified by HookStub::on().
54 calls to HookStub::record()
- authcache_ajax_test_page in modules/
authcache_ajax/ tests/ authcache_ajax_test.module - Menu callback: Build a page.
- authcache_backend_test_authcache_backend_cache_save in tests/
authcache_backend_test.module - Implements hook_authcache_backend_cache_save().
- authcache_backend_test_authcache_backend_key_set in tests/
authcache_backend_test.module - Implements hook_authcache_backend_key_set().
- authcache_backend_test_boot in tests/
authcache_backend_test.module - Implements hook_boot().
- authcache_builtin_test_authcache_preclude in modules/
authcache_builtin/ tests/ authcache_builtin_test.module - Implements hook_authcache_preclude().
File
- tests/
HookStub.inc, line 185 - Defines some helper classes for stubbing and recording hook invocations.
Class
- HookStub
- Static methods for keeping track of enabled hooks and invocations.
Code
public static function record($hookname, $args) {
if ($stub = variable_get('hookstub_' . $hookname)) {
$stub->invocations[] = $args;
variable_set('hookstub_' . $hookname, $stub);
return $stub->return;
}
}