Showing posts with label cms. Show all posts
Showing posts with label cms. Show all posts

Tuesday, March 9, 2010

An overall sketch of Drupal 7

-get drupal root
-drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL)
 define constants
 define('REQUEST_TIME', $_SERVER['REQUEST_TIME']);
 _drupal_bootstrap_configuration()
  error reporting set
  drupal_environment_initialize()
   server vars read
   ini settings set
   error reporting set
  timer_start('page')
   start timers
  drupal_settings_initialize()
   load settings
   set up path
   session cookies
 _drupal_bootstrap_page_cache();
  init user
  load cache
  check if no-db opt else - get db and variables
  block_denied
  cookie init
  _drupal_bootstrap_page_header()
   bootstrap_invoke_all
   drupal_page_get_cache
   check cachable - get cache
    -maybe still run boot hooks
    serve page from cache
    -maybe still run exit hooks
    _drupal_bootstrap_database();
  -set up db
  -register autoload
    _drupal_bootstrap_variables();
  -init variables (either via cache or db)
  -load modules
    require_once DRUPAL_ROOT . '/' . variable_get('session_inc', 'includes/session.inc');
    drupal_session_initialize();
  -conditionally start session
    _drupal_bootstrap_page_header();
  -boot all
  check cache
  get lock and init
  if !cli - ob start and page_header
   -init static + send headers   
    drupal_language_initialize();
  -get languages
  -invoke modules
    require_once DRUPAL_ROOT . '/includes/common.inc';
  define more constants
    _drupal_bootstrap_full();
  -load files
  -set up settings
  -varify
  -init path
  -init custom theme
  -run init hooks
-menu_execute_active_handler()