Skip navigation
Help

hook_boot

6 core.php hook_boot()
7 system.api.php hook_boot()

Perform setup tasks. See also, hook_init.

This hook is run at the beginning of the page request. It is typically used to set up global parameters which are needed later in the request.

Only use this hook if your code must run even for cached page views.This hook is called before modules or most include files are loaded into memory. It happens while Drupal is still in bootstrap mode.

Related topics

2 string references to 'hook_boot'

3 functions implement hook_boot()

File

drupal/modules/system/system.api.php, line 1731
Hooks provided by Drupal core and the System module.

Code

function hook_boot() {
  // we need user_access() in the shutdown function. make sure it gets loaded
  drupal_load('module', 'user');
  drupal_register_shutdown_function('devel_shutdown');
}