summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2012-08-03 10:04:18 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2012-08-03 10:04:18 -0700
commited2c39e2755ec00a7659710487812f173cd5236a (patch)
treed85c72c8a9066424b9da302884e9da8fafda7a6e /includes
parentdadf3adbfdf0c4b9692a30c1280ee45f5ec492b5 (diff)
downloadbrdo-ed2c39e2755ec00a7659710487812f173cd5236a.tar.gz
brdo-ed2c39e2755ec00a7659710487812f173cd5236a.tar.bz2
Issue #1436272 by Albert Volkman, colette, dandaman, coolestdude1: Add information to documentation of drupal_bootstrap function
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc24
1 files changed, 18 insertions, 6 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 753ecea43..709666714 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -2115,14 +2115,26 @@ function drupal_anonymous_user() {
/**
* Ensures Drupal is bootstrapped to the specified phase.
*
- * The bootstrap phase is an integer constant identifying a phase of Drupal
- * to load. Each phase adds to the previous one, so invoking a later phase
- * automatically runs the earlier phases as well. To access the Drupal
- * database from a script without loading anything else, include bootstrap.inc
- * and call drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE).
+ * In order to bootstrap Drupal from another PHP script, you can use this code:
+ * @code
+ * define('DRUPAL_ROOT', '/path/to/drupal');
+ * require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+ * drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+ * @endcode
*
* @param $phase
- * A constant. Allowed values are the DRUPAL_BOOTSTRAP_* constants.
+ * A constant telling which phase to bootstrap to. When you bootstrap to a
+ * particular phase, all earlier phases are run automatically. Possible
+ * values:
+ * - DRUPAL_BOOTSTRAP_CONFIGURATION: Initializes configuration.
+ * - DRUPAL_BOOTSTRAP_PAGE_CACHE: Tries to serve a cached page.
+ * - DRUPAL_BOOTSTRAP_DATABASE: Initializes the database layer.
+ * - DRUPAL_BOOTSTRAP_VARIABLES: Initializes the variable system.
+ * - DRUPAL_BOOTSTRAP_SESSION: Initializes session handling.
+ * - DRUPAL_BOOTSTRAP_PAGE_HEADER: Sets up the page header.
+ * - DRUPAL_BOOTSTRAP_LANGUAGE: Finds out the language of the page.
+ * - DRUPAL_BOOTSTRAP_FULL: Fully loads Drupal. Validates and fixes input
+ * data.
* @param $new_phase
* A boolean, set to FALSE if calling drupal_bootstrap from inside a
* function called from drupal_bootstrap (recursion).