Functions that need to be loaded on every Backdrop request.

File

includes/bootstrap.inc

Functions

Namesort descending Description
arg Returns a component of the current Backdrop path.
backdrop_add_http_header Sets an HTTP response header for the current page.
backdrop_anonymous_user Generates a default anonymous $user object.
backdrop_array_merge_deep Merges multiple arrays, recursively, and returns the merged array.
backdrop_array_merge_deep_array Merges multiple arrays, recursively, and returns the merged array.
backdrop_autoload Confirms that a class is available.
backdrop_base64_encode Returns a URL-safe, base64 encoded version of the supplied string.
backdrop_bootstrap Ensures Backdrop is bootstrapped to the specified phase.
_backdrop_bootstrap_configuration Sets up the script environment and loads settings.php.
_backdrop_bootstrap_database Initializes the database system and registers autoload functions.
backdrop_bootstrap_is_installed Verify the installation of Backdrop is correct.
_backdrop_bootstrap_page_cache Attempts to serve a page from the cache.
_backdrop_bootstrap_page_header Invokes hook_boot() and sends HTTP headers.
_backdrop_bootstrap_sanitize_input Sanitizes unsafe keys from request input.
_backdrop_bootstrap_sanitize_request Sanitizes unsafe input from the PHP request super-globals.
_backdrop_bootstrap_variables Loads system variables and all enabled bootstrap modules.
backdrop_check_memory_limit Compares the memory required for an operation to the available memory.
backdrop_check_trusted_hosts Checks if a host matches the trusted host patterns in settings.php.
backdrop_clear_opcode_cache Invalidates a PHP file from any active opcode caches.
backdrop_environment_initialize Initializes the PHP environment.
_backdrop_error_handler Provides custom PHP error handling.
_backdrop_exception_handler Provides custom PHP exception handling.
backdrop_find_backends This is a wrapper for silkscreen_find_backends(), in case someone happened to call it.
backdrop_generate_test_ua Generates a user agent string with a HMAC and timestamp for simpletest.
backdrop_get_bootstrap_phase Returns the current bootstrap phase for this Backdrop process.
backdrop_get_complete_schema Gets the whole database schema.
backdrop_get_filename Returns and optionally sets the filename for a system resource.
backdrop_get_http_header Gets the HTTP response headers for the current page.
backdrop_get_messages Returns all messages that have been set with backdrop_set_message().
backdrop_get_schema Gets the schema definition of a table, or the whole database schema.
backdrop_get_title Gets the title of the current page.
backdrop_get_user_timezone Returns the time zone of the current user.
backdrop_hash_base64 Calculates a base-64 encoded, URL-safe sha-256 hash.
backdrop_hmac_base64 Calculates a base-64 encoded, URL-safe sha-256 hmac.
backdrop_installation_attempted Returns TRUE if a Backdrop installation is currently being attempted.
backdrop_is_ajax Detects if this is an AJAX HTTP request.
backdrop_is_apache Checks whether Backdrop is running under Apache.
backdrop_is_background Stores if Backdrop is currently being executed in the background.
backdrop_is_cli Detects whether the current script is running in a command-line environment.
backdrop_is_dialog Detects if this is a dialog HTTP request.
backdrop_is_html Detects if this is an HTML HTTP request.
backdrop_is_https Checks whether an HTTPS request is being served.
backdrop_is_nginx Checks whether Backdrop is running under Nginx.
backdrop_language_initialize Initializes all the defined language types.
backdrop_load Includes a file with the provided type and name.
backdrop_load_backends Find and load all files for the requested backend type.
backdrop_maintenance_theme Enables use of the theme system without requiring database access.
backdrop_override_server_variables Sets appropriate server variables needed for command line scripts to work.
backdrop_page_get_cache Retrieves the current page from the cache.
backdrop_page_header Sets HTTP headers in preparation for a page response.
backdrop_page_is_cacheable Determines the cacheability of the current page.
backdrop_parse_info_file Parses Backdrop module and theme .info files.
backdrop_parse_info_format Parses data in Backdrop's .info format.
backdrop_placeholder Formats text for emphasized display in a placeholder inside a sentence.
backdrop_random_bytes Returns a string of highly randomized bytes (over the full 8-bit range).
backdrop_random_key Returns a URL-safe, base64 encoded string of highly randomized bytes (over the full 8-bit range).
backdrop_register_shutdown_function Registers a function for execution on shutdown.
backdrop_scan_directories
backdrop_send_headers Sends the HTTP response headers that were previously set, adding defaults.
backdrop_serve_page_from_cache Sets HTTP headers in preparation for a cached page response.
backdrop_set_length_headers Set headers for content-length and content-range.
backdrop_set_message Sets a message to display to the user.
_backdrop_set_preferred_header_name Sets the preferred name for the HTTP header.
backdrop_settings_initialize Sets the base URL, cookie domain, and session name from configuration.
backdrop_set_title Sets the title of the current page.
backdrop_show_messages Determines whether or not messages should be shown on the current page.
_backdrop_shutdown_function Executes registered shutdown functions.
backdrop_static Provides central static variable storage.
backdrop_static_reset Resets one or all centrally stored static variable(s).
backdrop_unpack Unserializes and appends elements from a serialized string.
backdrop_validate_utf8 Checks whether a string is valid UTF-8.
backdrop_valid_http_host Validates that a hostname (for example $_SERVER['HTTP_HOST']) is safe.
backdrop_valid_test_ua Returns the test prefix if this is an internal request from SimpleTest.
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.
fast_404 Returns a simple 404 Not Found page.
find_conf_path Finds the appropriate configuration directory for a given host and path.
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 used on the site.
language_list Returns a list of configured languages.
language_load Loads a language object from the database.
language_multilingual Returns TRUE if there is more than one language enabled.
language_name Produced the printed name for a language for display.
language_types_get_default Returns a list of the built-in language types.
request_path Returns the requested URL path of the page being viewed.
request_uri Returns the equivalent of Apache's $_SERVER['REQUEST_URI'] variable.
settings_get Returns a site-wide setting, usually specified via the settings.php file.
silkscreen_driver_list Returns a list of objects decribing the installed drivers indexed by their machine names. Each of the driver objects includes the path to their info file, their machine name, and the contents of their info files.
silkscreen_find_backends Scan the drivers directories for driver modules and load the class files for the type of backend requested. The supported types are 'config', 'cache', and 'database'.
state_del Unsets a persistent state value.
state_get Retrieves a "state" value from the database.
state_initialize Loads the persistent state table.
state_set Sets a persistent state value.
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 Deprecated Unsets a persistent variable.
variable_get Deprecated Returns a persistent variable.
variable_initialize Deprecated Loads the persistent variable table.
variable_set Deprecated Sets a persistent variable.
watchdog Logs a system message.
watchdog_deprecated_function Logs a deprecation warning.
watchdog_exception Logs an exception.
watchdog_severity_enabled Check if logging is enabled for a given severity level.

Constants

Namesort descending Description
BACKDROP_ANONYMOUS_ROLE Role ID for anonymous users.
BACKDROP_AUTHENTICATED_ROLE Role ID for authenticated users.
BACKDROP_BOOTSTRAP_CONFIGURATION First bootstrap phase: initialize configuration.
BACKDROP_BOOTSTRAP_DATABASE Third bootstrap phase: initialize database layer.
BACKDROP_BOOTSTRAP_FULL Final bootstrap phase: Backdrop is fully loaded; validate and fix input data.
BACKDROP_BOOTSTRAP_LANGUAGE Eighth bootstrap phase: find out language of the page.
BACKDROP_BOOTSTRAP_LOCK Fourth bootstrap phase: initialize the lock system.
BACKDROP_BOOTSTRAP_PAGE_CACHE Second bootstrap phase: try to serve a cached page.
BACKDROP_BOOTSTRAP_PAGE_HEADER Seventh bootstrap phase: set up the page header.
BACKDROP_BOOTSTRAP_SESSION Sixth bootstrap phase: initialize session handling.
BACKDROP_BOOTSTRAP_VARIABLES Fifth bootstrap phase: initialize the variable system.
BACKDROP_CORE_COMPATIBILITY Core API compatibility.
BACKDROP_KILOBYTE The number of bytes in a kilobyte.
BACKDROP_MINIMUM_PHP Minimum supported version of PHP.
BACKDROP_MINIMUM_PHP_MEMORY_LIMIT Minimum recommended value of PHP memory_limit.
BACKDROP_PHP_FUNCTION_PATTERN Regular expression to match PHP function names.
BACKDROP_VERSION The current system version.
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().
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_SYSTEM System language (only applicable to UI).
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.
REQUEST_TIME Time of the current request in seconds elapsed since the Unix Epoch.
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_DEPRECATED Log message severity -- Deprecated function / feature notices.
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

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