bootstrap.inc

Functions that need to be loaded on every Drupal request.

File

includes/bootstrap.inc

Functions

Name Description
arg Returns a component of the current Drupal path.
bootstrap_hooks Defines the critical hooks that force modules to always be loaded.
bootstrap_invoke_all Invokes a bootstrap hook in all bootstrap modules that implement it.
check_plain Encodes special characters in a plain-text string for display as HTML.
conf_path Returns the appropriate configuration directory.
drupal_add_http_header Sets an HTTP response header for the current page.
drupal_anonymous_user Generates a default anonymous $user object.
drupal_array_merge_deep Merges multiple arrays, recursively, and returns the merged array.
drupal_array_merge_deep_array Merges multiple arrays, recursively, and returns the merged array.
drupal_autoload_class Confirms that a class is available.
drupal_autoload_interface Confirms that an interface is available.
drupal_autoload_trait Confirms that a trait is available.
drupal_base64_encode Returns a URL-safe, base64 encoded version of the supplied string.
drupal_block_denied Handles denied users.
drupal_bootstrap Ensures Drupal is bootstrapped to the specified phase.
drupal_check_memory_limit Compares the memory required for an operation to the available memory.
drupal_clear_opcode_cache Invalidates a PHP file from any active opcode caches.
drupal_environment_initialize Initializes the PHP environment.
drupal_fast_404 Returns a simple 404 Not Found page.
drupal_file_scan_write_cache Writes the file scan cache to the persistent cache.
drupal_generate_test_ua Generates a user agent string with a HMAC and timestamp for simpletest.
drupal_get_bootstrap_phase Returns the current bootstrap phase for this Drupal process.
drupal_get_complete_schema Gets the whole database schema.
drupal_get_filename Returns and optionally sets the filename for a system resource.
drupal_get_hash_salt Gets a salt useful for hardening against SQL injection.
drupal_get_http_header Gets the HTTP response headers for the current page.
drupal_get_messages Returns all messages that have been set with drupal_set_message().
drupal_get_schema Gets the schema definition of a table, or the whole database schema.
drupal_get_title Gets the title of the current page.
drupal_get_user_timezone Returns the time zone of the current user.
drupal_hash_base64 Calculates a base-64 encoded, URL-safe sha-256 hash.
drupal_hmac_base64 Calculates a base-64 encoded, URL-safe sha-256 hmac.
drupal_installation_attempted Returns TRUE if a Drupal installation is currently being attempted.
drupal_is_cli Detects whether the current script is running in a command-line environment.
drupal_is_denied Checks to see if an IP address has been blocked.
drupal_language_initialize Initializes all the defined language types.
drupal_language_types Returns a list of the built-in language types.
drupal_load Includes a file with the provided type and name.
drupal_maintenance_theme Enables use of the theme system without requiring database access.
drupal_multilingual Returns TRUE if there is more than one language enabled.
drupal_override_server_variables Sets appropriate server variables needed for command line scripts to work.
drupal_page_get_cache Retrieves the current page from the cache.
drupal_page_header Sets HTTP headers in preparation for a page response.
drupal_page_is_cacheable Determines the cacheability of the current page.
drupal_placeholder Formats text for emphasized display in a placeholder inside a sentence.
drupal_random_bytes Returns a string of highly randomized bytes (over the full 8-bit range).
drupal_random_key Returns a URL-safe, base64 encoded string of highly randomized bytes (over the full 8-bit range).
drupal_register_shutdown_function Registers a function for execution on shutdown.
drupal_send_headers Sends the HTTP response headers that were previously set, adding defaults.
drupal_serve_page_from_cache Sets HTTP headers in preparation for a cached page response.
drupal_settings_initialize Sets the base URL, cookie domain, and session name from configuration.
drupal_set_message Sets a message to display to the user.
drupal_set_title Sets the title of the current page.
drupal_static Provides central static variable storage.
drupal_static_reset Resets one or all centrally stored static variable(s).
drupal_unpack Unserializes and appends elements from a serialized string.
drupal_validate_utf8 Checks whether a string is valid UTF-8.
drupal_valid_http_host Validates that a hostname (for example $_SERVER['HTTP_HOST']) is safe.
drupal_valid_test_ua Returns the test prefix if this is an internal request from SimpleTest.
format_string Formats a string for HTML display by replacing variable placeholders.
get_t Returns the name of the proper localization function.
ip_address Returns the IP address of the client machine.
language_default Returns the default language, as an object, or one of its properties.
language_list Returns a list of installed languages, indexed by the specified key.
language_types Returns an array of the available language types.
registry_rebuild Rescans all enabled modules and rebuilds the registry.
registry_update Updates the registry based on the latest files listed in the database.
request_path Returns the requested URL path of the page being viewed.
request_uri Returns the equivalent of Apache's $_SERVER['REQUEST_URI'] variable.
t Translates a string to the current language or to a given language.
timer_read Reads the current timer value without stopping the timer.
timer_start Starts the timer with the specified name.
timer_stop Stops the timer with the specified name.
variable_del Unsets a persistent variable.
variable_get Returns a persistent variable.
variable_initialize Loads the persistent variable table.
variable_set Sets a persistent variable.
watchdog Logs a system message.
watchdog_exception Logs an exception.
_drupal_bootstrap_configuration Sets up the script environment and loads settings.php.
_drupal_bootstrap_database Initializes the database system and registers autoload functions.
_drupal_bootstrap_page_cache Attempts to serve a page from the cache.
_drupal_bootstrap_page_header Invokes hook_boot(), initializes locking system, and sends HTTP headers.
_drupal_bootstrap_variables Loads system variables and all enabled bootstrap modules.
_drupal_error_handler Provides custom PHP error handling.
_drupal_exception_handler Provides custom PHP exception handling.
_drupal_file_scan_cache Returns the current list of cached file system scan results.
_drupal_get_filename_fallback Performs a cached file system scan as a fallback when searching for a file.
_drupal_get_filename_fallback_trigger_error Triggers a user-level warning for missing or unexpectedly moved files.
_drupal_get_filename_perform_file_scan Performs a file system scan to search for a system resource.
_drupal_set_preferred_header_name Sets the preferred name for the HTTP header.
_drupal_shutdown_function Executes registered shutdown functions.
_drupal_trigger_error_with_delayed_logging Invokes trigger_error() with logging delayed until the end of the request.
_registry_check_code Checks for a resource in the registry.

Constants

Name Description
CACHE_PERMANENT Indicates that the item should never be removed unless explicitly selected.
CACHE_TEMPORARY Indicates that the item should be removed at the next general cache wipe.
CHECK_PLAIN Flag used to indicate that text is not sanitized, so run check_plain().
DATE_RFC7231 A RFC7231 Compliant date.
DRUPAL_ANONYMOUS_RID Role ID for anonymous users; should match what's in the "role" table.
DRUPAL_AUTHENTICATED_RID Role ID for authenticated users; should match what's in the "role" table.
DRUPAL_BOOTSTRAP_CONFIGURATION First bootstrap phase: initialize configuration.
DRUPAL_BOOTSTRAP_DATABASE Third bootstrap phase: initialize database layer.
DRUPAL_BOOTSTRAP_FULL Final bootstrap phase: Drupal is fully loaded; validate and fix input data.
DRUPAL_BOOTSTRAP_LANGUAGE Seventh bootstrap phase: find out language of the page.
DRUPAL_BOOTSTRAP_PAGE_CACHE Second bootstrap phase: try to serve a cached page.
DRUPAL_BOOTSTRAP_PAGE_HEADER Sixth bootstrap phase: set up the page header.
DRUPAL_BOOTSTRAP_SESSION Fifth bootstrap phase: initialize session handling.
DRUPAL_BOOTSTRAP_VARIABLES Fourth bootstrap phase: initialize the variable system.
DRUPAL_CORE_COMPATIBILITY Core API compatibility.
DRUPAL_KILOBYTE The number of bytes in a kilobyte.
DRUPAL_MINIMUM_PHP Minimum supported version of PHP.
DRUPAL_MINIMUM_PHP_MEMORY_LIMIT Minimum recommended value of PHP memory_limit.
DRUPAL_PHP_FUNCTION_PATTERN Regular expression to match PHP function names.
ERROR_REPORTING_DISPLAY_ALL Error reporting level: display all messages.
ERROR_REPORTING_DISPLAY_SOME Error reporting level: display errors and warnings.
ERROR_REPORTING_HIDE Error reporting level: display no errors.
LANGUAGE_LTR Language written left to right. Possible value of $language->direction.
LANGUAGE_NONE The language code used when no language is explicitly assigned.
LANGUAGE_RTL Language written right to left. Possible value of $language->direction.
LANGUAGE_TYPE_CONTENT The type of language used to define the content language.
LANGUAGE_TYPE_INTERFACE The type of language used to select the user interface.
LANGUAGE_TYPE_URL The type of language used for URLs.
PASS_THROUGH Flag used to indicate that text has already been sanitized.
REGISTRY_RESET_LOOKUP_CACHE Signals that the registry lookup cache should be reset.
REGISTRY_WRITE_LOOKUP_CACHE Signals that the registry lookup cache should be written to storage.
REQUEST_TIME Time of the current request in seconds elapsed since the Unix Epoch.
VERSION The current system version.
WATCHDOG_ALERT Log message severity -- Alert: action must be taken immediately.
WATCHDOG_CRITICAL Log message severity -- Critical conditions.
WATCHDOG_DEBUG Log message severity -- Debug-level messages.
WATCHDOG_EMERGENCY Log message severity -- Emergency: system is unusable.
WATCHDOG_ERROR Log message severity -- Error conditions.
WATCHDOG_INFO Log message severity -- Informational messages.
WATCHDOG_NOTICE Log message severity -- Normal but significant conditions.
WATCHDOG_WARNING Log message severity -- Warning conditions.

Classes

Name Description
DrupalCacheArray Provides a caching wrapper to be used in place of large array structures.
SchemaCache Extends DrupalCacheArray to allow for dynamic building of the schema cache.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!bootstrap.inc/7.x