function adserve_cache_hook in Advertisement 7
Same name and namespace in other branches
- 5.2 adcache.inc \adserve_cache_hook()
- 6.3 adcache.inc \adserve_cache_hook()
- 6.2 adcache.inc \adserve_cache_hook()
Invoke the appropraite hook.
File
- ./
adcache.inc, line 174
Code
function adserve_cache_hook($hook) {
static $cache = NULL;
// if we don't have the cache yet, build it
if (is_null($cache)) {
$external = adserve_cache('get_cache');
$cache = adserve_cache('build_hooks', $external);
}
// return hook definition, if exists
if (is_array($cache) && isset($cache["hook_{$hook}"]) && is_array($cache["hook_{$hook}"])) {
_debug_echo("Invoking hook '{$hook}'.");
return $cache["hook_{$hook}"];
}
_debug_echo("Did not find hook '{$hook}'.");
}