bootstrap.inc
Version 1.321 (checked in on 2009/11/05 at 03:00:21 by dries)
Functions that need to be loaded on every Drupal request.
Constants
| Name | Description |
|---|---|
| CACHE_DISABLED | Indicates that page caching is disabled. |
| CACHE_NORMAL | Indicates that page caching is enabled, using "normal" mode. |
| CACHE_PERMANENT | Indicates that the item should never be removed unless explicitly told to using cache_clear_all() with a cache ID. |
| CACHE_TEMPORARY | Indicates that the item should be removed at the next general cache wipe. |
| CHECK_PLAIN | Flag for drupal_set_title(); text is not sanitized, so run check_plain(). |
| 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. For more information, visit http://en.wikipedia.org/wiki/Kilobyte. |
| DRUPAL_MINIMUM_MYSQL | Minimum supported version of MySQL, if it is used. |
| DRUPAL_MINIMUM_PGSQL | Minimum supported version of PostgreSQL, if it is used. |
| DRUPAL_MINIMUM_PHP | Minimum supported version of PHP. |
| DRUPAL_MINIMUM_PHP_MEMORY_LIMIT | Minimum recommended value of PHP memory_limit. |
| LANGUAGE_LTR | Language written left to right. Possible value of $language->direction. |
| 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 for drupal_set_title(); 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 | For convenience, define a short form of the request time global. |
| VERSION | The current system version. |
| WATCHDOG_ALERT | Log message severity -- Alert: action must be taken immediately. |
| WATCHDOG_CRITICAL | Log message severity -- Critical: critical conditions. |
| WATCHDOG_DEBUG | Log message severity -- Debug: debug-level messages. |
| WATCHDOG_EMERG | Log message severity -- Emergency: system is unusable. |
| WATCHDOG_ERROR | Log message severity -- Error: error conditions. |
| WATCHDOG_INFO | Log message severity -- Informational: informational messages. |
| WATCHDOG_NOTICE | Log message severity -- Notice: normal but significant condition. |
| WATCHDOG_WARNING | Log message severity -- Warning: warning conditions. |
Functions
| Name | Description |
|---|---|
| bootstrap_hooks | Define the critical hooks that force modules to always be loaded. |
| bootstrap_invoke_all | Call all init or exit hooks without including all modules. |
| check_plain | Encode special characters in a plain-text string for display as HTML. |
| conf_path | Find the appropriate configuration directory. |
| drupal_add_http_header | Set an HTTP response header for the current page. |
| drupal_anonymous_user | Generates a default anonymous $user object. |
| drupal_autoload_class | Confirm that a class is available. |
| drupal_autoload_interface | Confirm that an interface is available. |
| drupal_block_denied | Handle denied users. |
| drupal_bootstrap | A string describing a phase of Drupal to load. Each phase adds to the previous one, so invoking a later phase automatically runs the earlier phases too. The most important usage is that if you want to access the Drupal database from a script without... |
| drupal_environment_initialize | Initialize PHP environment. |
| drupal_generate_test_ua | Generate 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_filename | Returns and optionally sets the filename for a system item (module, theme, etc.). The filename, whether provided, cached, or retrieved from the database, is only returned if the file exists. |
| drupal_get_http_header | Get the HTTP response headers for the current page. |
| drupal_get_messages | Return all messages that have been set. |
| drupal_get_schema | Get the schema definition of a table, or the whole database schema. |
| drupal_installation_attempted | Return TRUE if a Drupal installation is currently being attempted. |
| drupal_is_cli | Detect whether the current script is running in a command-line environment. |
| drupal_is_denied | Check to see if an IP address has been blocked. |
| drupal_language_initialize | Initialize all the defined language types. |
| drupal_language_types | The built-in language types. |
| drupal_load | Includes a file with the provided type and name. This prevents including a theme, engine, module, etc., more than once. |
| drupal_maintenance_theme | Enables use of the theme system without requiring database access. |
| drupal_multilingual | Return true if there is more than one language enabled. |
| drupal_override_server_variables | Set appropriate server variables needed for command line scripts to work. |
| drupal_page_get_cache | Retrieve the current page from the cache. |
| drupal_page_header | Set HTTP headers in preparation for a page response. |
| drupal_page_is_cacheable | Determine the cacheability of the current page. |
| drupal_send_headers | Send the HTTP response headers previously set using drupal_add_http_header(). Add default headers, unless they have been replaced or unset using drupal_add_http_header(). |
| drupal_serve_page_from_cache | Set HTTP headers in preparation for a cached page response. |
| drupal_settings_initialize | Loads the configuration and sets the base URL, cookie domain, and session name correctly. |
| drupal_set_message | Set a message which reflects the status of the performed operation. |
| drupal_static | Central static variable storage. |
| drupal_static_reset | Reset 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 | Validate that a hostname (for example $_SERVER['HTTP_HOST']) is safe. |
| drupal_valid_test_ua | Validate the HMAC and timestamp of a user agent header from simpletest. |
| get_t | Return the name of the localization function. Use in code that needs to run both during installation and normal operation. |
| ip_address | If Drupal is behind a reverse proxy, we use the X-Forwarded-For header instead of $_SERVER['REMOTE_ADDR'], which would be the IP address of the proxy server, and not the client's. If Drupal is run in a cluster we use the... |
| language_default | Default language used on the site |
| language_list | Get a list of languages set up indexed by the specified key |
| language_types | Return an array of the available language types. |
| registry_rebuild | Rescan all enabled modules and rebuild the registry. |
| request_uri | Since $_SERVER['REQUEST_URI'] is only available on Apache, we generate an equivalent using other environment variables. |
| timer_read | Read the current timer value without stopping the timer. |
| timer_start | Start the timer with the specified name. If you start and stop the same timer multiple times, the measured intervals will be accumulated. |
| timer_stop | Stop the timer with the specified name. |
| variable_del | Unset a persistent variable. |
| variable_get | Return a persistent variable. |
| variable_initialize | Load the persistent variable table. |
| variable_set | Set a persistent variable. |
| watchdog | Log a system message. |
| _drupal_bootstrap_configuration | Bootstrap configuration: Setup script environment and load settings.php. |
| _drupal_bootstrap_database | Bootstrap database: Initialize database system and register autoload functions. |
| _drupal_bootstrap_page_cache | Bootstrap page cache: Try to serve a page from cache. |
| _drupal_bootstrap_page_header | Bootstrap page header: Invoke hook_boot(), intialize locking system, and send default HTTP headers. |
| _drupal_bootstrap_variables | Bootstrap variables: Load system variables and all enabled bootstrap modules. |
| _drupal_set_preferred_header_name | Header names are case-insensitive, but for maximum compatibility they should follow "common form" (see RFC 2617, section 4.2). |
| _registry_check_code | Helper to check for a resource in the registry. |
