1 system.api.php | hook_exit($destination = NULL) |
Perform cleanup tasks.
This hook is run at the end of most regular page requests. It is often used for page logging and specialized cleanup. This hook MUST NOT print anything because by the time it runs the response is already sent to the browser.
This hook by default is not called on pages served by the default page cache, but can be enabled through the $settings['page_cache_invoke_hook'] option in settings.php.
Parameters
$destination: If this hook is invoked as part of a backdrop_goto() call, then this argument will be a fully-qualified URL that is the destination of the redirect.
Related topics
File
- core/
modules/ system/ system.api.php, line 280 - Hooks provided by Backdrop core and the System module.
Code
function hook_exit($destination = NULL) {
db_update('counter')
->expression('hits', 'hits + 1')
->condition('type', 1)
->execute();
}