C:/drupal/includes/bootstrap.inc File Reference

Go to the source code of this file.


Enumerations

enum  CACHE_PERMANENT
enum  CACHE_TEMPORARY
enum  CACHE_DISABLED
enum  CACHE_NORMAL
enum  CACHE_AGGRESSIVE
enum  WATCHDOG_EMERG
enum  WATCHDOG_ALERT
enum  WATCHDOG_CRITICAL
enum  WATCHDOG_ERROR
enum  WATCHDOG_WARNING
enum  WATCHDOG_NOTICE
enum  WATCHDOG_INFO
enum  WATCHDOG_DEBUG
enum  DRUPAL_BOOTSTRAP_CONFIGURATION
enum  DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE
enum  DRUPAL_BOOTSTRAP_DATABASE
enum  DRUPAL_BOOTSTRAP_ACCESS
enum  DRUPAL_BOOTSTRAP_SESSION
enum  DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE
enum  DRUPAL_BOOTSTRAP_LANGUAGE
enum  DRUPAL_BOOTSTRAP_PATH
enum  DRUPAL_BOOTSTRAP_FULL
enum  DRUPAL_ANONYMOUS_RID
enum  DRUPAL_AUTHENTICATED_RID
enum  LANGUAGE_NEGOTIATION_NONE
enum  LANGUAGE_NEGOTIATION_PATH_DEFAULT
enum  LANGUAGE_NEGOTIATION_PATH
enum  LANGUAGE_NEGOTIATION_DOMAIN

Functions

 timer_start ($name)
 timer_read ($name)
 timer_stop ($name)
 conf_path ($require_settings=TRUE, $reset=FALSE)
 drupal_unset_globals ()
 conf_init ()
 drupal_get_filename ($type, $name, $filename=NULL)
 variable_init ($conf=array())
 variable_get ($name, $default)
 variable_set ($name, $value)
 variable_del ($name)
 page_get_cache ()
 bootstrap_invoke_all ($hook)
 drupal_load ($type, $name)
 drupal_page_header ()
 drupal_page_cache_header ($cache)
 bootstrap_hooks ()
 drupal_unpack ($obj, $field= 'data')
 referer_uri ()
 check_plain ($text)
 drupal_validate_utf8 ($text)
 request_uri ()
 watchdog ($type, $message, $variables=array(), $severity=WATCHDOG_NOTICE, $link=NULL)
 drupal_set_message ($message=NULL, $type= 'status', $repeat=TRUE)
 drupal_get_messages ($type=NULL, $clear_queue=TRUE)
 drupal_is_denied ($ip)
 drupal_anonymous_user ($session= '')
 drupal_bootstrap ($phase)
 _drupal_bootstrap ($phase)
 drupal_maintenance_theme ()
 get_t ()
 drupal_init_language ()
 language_list ($field= 'language', $reset=FALSE)
 language_default ($property=NULL)
 ip_address ()
 drupal_function_exists ($function)
 drupal_autoload_interface ($interface)
 drupal_autoload_class ($class)
 _registry_check_code ($type, $name)
 registry_mark_code ($type, $name, $return=FALSE)
 drupal_rebuild_code_registry ()
 registry_cache_hook_implementations ($hook, $write_to_persistent_cache=FALSE)
 registry_cache_path_files ()
 registry_load_path_files ($return=FALSE)
 registry_get_hook_implementations_cache ()


Detailed Description

Functions that need to be loaded on every Drupal request.

Definition in file bootstrap.inc.


Enumeration Type Documentation

Indicates that page caching is using "aggressive" mode. This bypasses loading any modules for additional speed, which may break functionality in modules that expect to be run on each page load.

Definition at line 35 of file bootstrap.inc.

Indicates that page caching is disabled.

Definition at line 23 of file bootstrap.inc.

Indicates that page caching is enabled, using "normal" mode.

Definition at line 28 of file bootstrap.inc.

Indicates that the item should never be removed unless explicitly told to using cache_clear_all() with a cache ID.

Definition at line 13 of file bootstrap.inc.

Indicates that the item should be removed at the next general cache wipe.

Definition at line 18 of file bootstrap.inc.

Role ID for anonymous users; should match what's in the "role" table.

Definition at line 152 of file bootstrap.inc.

Role ID for authenticated users; should match what's in the "role" table.

Definition at line 157 of file bootstrap.inc.

Fourth bootstrap phase: identify and reject banned hosts.

Definition at line 120 of file bootstrap.inc.

First bootstrap phase: initialize configuration.

Definition at line 104 of file bootstrap.inc.

Third bootstrap phase: initialize database layer.

Definition at line 115 of file bootstrap.inc.

Second bootstrap phase: try to call a non-database cache fetch routine.

Definition at line 110 of file bootstrap.inc.

Final bootstrap phase: Drupal is fully loaded; validate and fix input data.

Definition at line 147 of file bootstrap.inc.

Seventh bootstrap phase: find out language of the page.

Definition at line 136 of file bootstrap.inc.

Sixth bootstrap phase: load bootstrap.inc and module.inc, start the variable system and try to serve a page from the cache.

Definition at line 131 of file bootstrap.inc.

Eighth bootstrap phase: set $_GET['q'] to Drupal path of request.

Definition at line 141 of file bootstrap.inc.

Fifth bootstrap phase: initialize session handling.

Definition at line 125 of file bootstrap.inc.

Domain based negotiation with fallback to default language if no language identified by domain.

Definition at line 181 of file bootstrap.inc.

No language negotiation. The default language is used.

Definition at line 162 of file bootstrap.inc.

Path based negotiation with fallback to user preferences and browser language detection if no defined path prefix identified.

Definition at line 175 of file bootstrap.inc.

Path based negotiation with fallback to default language if no defined path prefix identified.

Definition at line 168 of file bootstrap.inc.

Log message severity -- Alert: action must be taken immediately.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 51 of file bootstrap.inc.

Log message severity -- Critical: critical conditions.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 59 of file bootstrap.inc.

Log message severity -- Debug: debug-level messages.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 99 of file bootstrap.inc.

Log message severity -- Emergency: system is unusable.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 43 of file bootstrap.inc.

Log message severity -- Error: error conditions.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 67 of file bootstrap.inc.

Log message severity -- Informational: informational messages.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 91 of file bootstrap.inc.

Log message severity -- Notice: normal but significant condition.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 83 of file bootstrap.inc.

Log message severity -- Warning: warning conditions.

See also:
watchdog()

watchdog_severity_levels()

Definition at line 75 of file bootstrap.inc.


Function Documentation

_drupal_bootstrap ( phase  ) 

bootstrap_hooks (  ) 

Define the critical hooks that force modules to always be loaded.

Definition at line 682 of file bootstrap.inc.

Referenced by module_rebuild_cache().

bootstrap_invoke_all ( hook  ) 

Call all init or exit hooks without including all modules.

Parameters:
$hook The name of the bootstrap hook we wish to invoke.

Definition at line 569 of file bootstrap.inc.

References module_invoke(), and module_list().

Referenced by _drupal_bootstrap().

Here is the call graph for this function:

check_plain ( text  ) 

Encode special characters in a plain-text string for display as HTML.

Uses drupal_validate_utf8 to prevent cross site scripting attacks on Internet Explorer 6.

Definition at line 720 of file bootstrap.inc.

References drupal_validate_utf8().

Referenced by _db_query(), _drupal_bootstrap(), _locale_translate_seek(), _system_sql(), aggregator_categorize_items(), aggregator_form_feed(), aggregator_page_source(), block_admin_display_form(), book_admin_edit(), book_outline(), comment_multiple_delete_confirm(), conf_init(), contact_mail_user(), contact_user_page(), db_add_field(), dblog_event(), drupal_access_denied(), drupal_attributes(), drupal_get_title(), drupal_not_found(), expand_radios(), file_check_directory(), form_select_options(), format_rss_channel(), format_rss_item(), format_xml_elements(), garland_preprocess_page(), l(), locale_languages_overview_form(), locale_translate_edit_form(), menu_path_is_external(), node_admin_nodes(), node_body_field(), node_multiple_delete_confirm(), node_overview_types(), openid_user_identities(), path_admin_edit(), path_admin_overview(), poll_results(), poll_votes(), profile_admin_overview(), profile_admin_settings_autocomplete(), profile_autocomplete(), profile_browse(), st(), statistics_access_log(), statistics_node_tracker(), statistics_user_tracker(), system_theme_settings(), t(), taxonomy_autocomplete(), taxonomy_overview_vocabularies(), taxonomy_term_page(), template_preprocess_aggregator_item(), template_preprocess_aggregator_summary_item(), template_preprocess_aggregator_summary_items(), template_preprocess_node(), template_preprocess_search_result(), template_preprocess_user_profile_category(), theme_aggregator_page_opml(), theme_button(), theme_filter_admin_overview(), theme_hidden(), theme_image(), theme_image_button(), theme_links(), theme_locale_languages_overview_form(), theme_placeholder(), theme_radio(), theme_textarea(), theme_textfield(), theme_update_report(), theme_username(), tracker_page(), trigger_unassign_submit(), update_do_one(), update_sql(), url(), user_autocomplete(), user_edit(), user_view(), and xmlrpc_value_get_xml().

Here is the call graph for this function:

conf_init (  ) 

Loads the configuration and sets the base URL, cookie domain, and session name correctly.

Definition at line 322 of file bootstrap.inc.

References $base_url, $db_prefix, $db_url, $update_free_access, check_plain(), and conf_path().

Referenced by _drupal_bootstrap().

Here is the call graph for this function:

conf_path ( require_settings = TRUE,
reset = FALSE 
)

Find the appropriate configuration directory.

Try finding a matching configuration directory by stripping the website's hostname from left to right and pathname from right to left. The first configuration file found will be used; the remaining will ignored. If no configuration file is found, return a default value '$confdir/default'.

Example for a fictitious site installed at the 'settings.php' is searched in the following directories:

1. $confdir/8080.www.drupal.org.mysite.test 2. $confdir/www.drupal.org.mysite.test 3. $confdir/drupal.org.mysite.test 4. $confdir/org.mysite.test

5. $confdir/8080.www.drupal.org.mysite 6. $confdir/www.drupal.org.mysite 7. $confdir/drupal.org.mysite 8. $confdir/org.mysite

9. $confdir/8080.www.drupal.org 10. $confdir/www.drupal.org 11. $confdir/drupal.org 12. $confdir/org

13. $confdir/default

Parameters:
$require_settings Only configuration directories with an existing settings.php file will be recognized. Defaults to TRUE. During initial installation, this is set to FALSE so that Drupal can detect a matching directory, then create a new settings.php file in it.
reset Force a full search for matching directories even if one had been found previously.
Returns:
The path of the matching directory.

Definition at line 281 of file bootstrap.inc.

Referenced by conf_init(), drupal_get_filename(), drupal_rewrite_settings(), drupal_system_listing(), file_directory_path(), install_change_settings(), install_check_requirements(), install_tasks(), and install_verify_settings().

drupal_anonymous_user ( session = ''  ) 

Generates a default anonymous $user object.

Returns:
Object - the user object.

Definition at line 929 of file bootstrap.inc.

References ip_address().

Referenced by sess_read(), and user_logout().

Here is the call graph for this function:

drupal_bootstrap ( phase  ) 

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 loading anything else, you can include bootstrap.inc, and call drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE).

Parameters:
$phase A constant. Allowed values are: DRUPAL_BOOTSTRAP_CONFIGURATION: initialize configuration. DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE: try to call a non-database cache fetch routine. DRUPAL_BOOTSTRAP_DATABASE: initialize database layer. DRUPAL_BOOTSTRAP_ACCESS: identify and reject banned hosts. DRUPAL_BOOTSTRAP_SESSION: initialize session handling. DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE: load bootstrap.inc and module.inc, start the variable system and try to serve a page from the cache. DRUPAL_BOOTSTRAP_LANGUAGE: identify the language used on the page. DRUPAL_BOOTSTRAP_PATH: set $_GET['q'] to Drupal path of request. DRUPAL_BOOTSTRAP_FULL: Drupal is fully loaded, validate and fix input data.

Definition at line 960 of file bootstrap.inc.

References _drupal_bootstrap().

Referenced by drupal_install_system(), init_theme(), install_main(), and install_tasks().

Here is the call graph for this function:

drupal_get_filename ( type,
name,
filename = NULL 
)

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.

This function plays a key role in allowing Drupal's resources (modules and themes) to be located in different places depending on a site's configuration. For example, a module 'foo' may legally be be located in any of these three places:

modules/foo/foo.module sites/all/modules/foo/foo.module sites/example.com/modules/foo/foo.module

Calling drupal_get_filename('module', 'foo') will give you one of the above, depending on where the module is located.

Parameters:
$type The type of the item (i.e. theme, theme_engine, module).
$name The name of the item for which the filename is requested.
$filename The filename of the item if it is to be set explicitly rather than by consulting the database.
Returns:
The filename of the requested item.

Definition at line 419 of file bootstrap.inc.

References $name, $type, conf_path(), db_is_active(), db_query(), and db_result().

Referenced by drupal_get_path(), drupal_install_system(), drupal_load(), module_list(), and system_modules_uninstall_confirm_form().

Here is the call graph for this function:

drupal_get_messages ( type = NULL,
clear_queue = TRUE 
)

Return all messages that have been set.

Parameters:
$type (optional) Only return messages of this type.
$clear_queue (optional) Set to FALSE if you do not want to clear the messages queue
Returns:
An associative array, the key is the message type, the value an array of messages. If the $type parameter is passed, you get only that type, or an empty array if there are no such messages. If $type is not passed, all message types are returned, or an empty array if none exist.

Definition at line 877 of file bootstrap.inc.

References $messages, $type, and drupal_set_message().

Referenced by page_set_cache(), and theme_status_messages().

Here is the call graph for this function:

drupal_init_language (  ) 

Choose a language for the current page, based on site and user preferences.

Definition at line 1091 of file bootstrap.inc.

References language_default(), language_initialize(), and variable_get().

Referenced by _drupal_bootstrap(), and install_main().

Here is the call graph for this function:

drupal_is_denied ( ip  ) 

Check to see if an IP address has been blocked.

Blocked IP addresses are stored in the database by default. However for performance reasons we allow an override in settings.php. This allows us to avoid querying the database at this critical stage of the bootstrap if an administrative interface for IP address blocking is not required.

Parameters:
$ip string IP address to check.
Returns:
bool TRUE if access is denied, FALSE if access is allowed.

Definition at line 910 of file bootstrap.inc.

References db_query(), db_result(), and variable_get().

Referenced by _drupal_bootstrap().

Here is the call graph for this function:

drupal_load ( type,
name 
)

Includes a file with the provided type and name. This prevents including a theme, engine, module, etc., more than once.

Parameters:
$type The type of item to load (i.e. theme, theme_engine, module).
$name The name of the item to load.
Returns:
TRUE if the item is loaded or has already been loaded.

Definition at line 587 of file bootstrap.inc.

References $name, $type, and drupal_get_filename().

Referenced by _drupal_maintenance_theme(), drupal_uninstall_module(), install_main(), module_enable(), and module_load_all().

Here is the call graph for this function:

drupal_maintenance_theme (  ) 

Enables use of the theme system without requiring database access.

Loads and initializes the theme system for site installs, updates and when the site is in off-line mode. This also applies when the database fails.

See also:
_drupal_maintenance_theme()

Definition at line 1071 of file bootstrap.inc.

References _drupal_maintenance_theme().

Referenced by _db_error_page(), drupal_site_offline(), and install_main().

Here is the call graph for this function:

drupal_page_cache_header ( cache  ) 

Set HTTP headers in preparation for a cached page response.

The general approach here is that anonymous users can keep a local cache of the page, but must revalidate it on every request. Then, they are given a '304 Not Modified' response as long as they stay logged out and the page has not been modified.

Definition at line 631 of file bootstrap.inc.

References $header, exit, print, and variable_get().

Referenced by _drupal_bootstrap().

Here is the call graph for this function:

drupal_page_header (  ) 

Set HTTP headers in preparation for a page response.

Authenticated users are always given a 'no-cache' header, and will fetch a fresh page on every request. This prevents authenticated users seeing locally cached pages that show them as logged out.

See also:
page_set_cache()

Definition at line 615 of file bootstrap.inc.

Referenced by _drupal_bootstrap(), and install_main().

drupal_set_message ( message = NULL,
type = 'status',
repeat = TRUE 
)

Set a message which reflects the status of the performed operation.

If the function is called with no arguments, this function returns all set messages without clearing them.

Parameters:
$message The message should begin with a capital letter and always ends with a period '.'.
$type The type of the message. One of the following values are possible:
  • 'status'
  • 'warning'
  • 'error'
$repeat If this is FALSE and the message is already set, then the message won't be repeated.

Definition at line 845 of file bootstrap.inc.

References $type.

Referenced by _batch_do(), _locale_batch_language_finished(), _locale_batch_system_finished(), _locale_import_message(), _locale_import_parse_plural_forms(), _locale_import_po(), _menu_site_is_offline(), _module_build_dependencies(), _node_mass_update_batch_finished(), aggregator_categorize_items_submit(), aggregator_form_category_submit(), aggregator_form_feed_submit(), block_add_block_form_submit(), block_admin_configure_submit(), block_admin_display_form_submit(), block_box_delete_submit(), blog_page_last(), blog_page_user(), book_admin_edit_submit(), book_export(), book_outline_form_submit(), book_remove_form_submit(), comment_admin_overview_submit(), comment_confirm_delete_submit(), comment_delete(), comment_multiple_delete_confirm(), comment_multiple_delete_confirm_submit(), comment_reply(), contact_admin_delete_submit(), contact_admin_edit_submit(), contact_mail_page(), contact_mail_page_submit(), contact_mail_user_submit(), db_check_setup(), drupal_check_module(), drupal_error_handler(), drupal_get_messages(), drupal_mail(), drupal_rewrite_settings(), drupal_test_mysql(), drupal_test_mysqli(), drupal_test_pgsql(), drupal_verify_profile(), DrupalTests::DrupalTests(), file_check_directory(), file_copy(), file_destination(), file_move(), file_munge_filename(), file_save_data(), file_save_upload(), file_validate_image_resolution(), filter_admin_delete(), filter_admin_delete_submit(), filter_admin_format_form_submit(), filter_admin_order_submit(), filter_admin_overview_submit(), form_set_error(), forum_confirm_delete_submit(), forum_form_submit(), install_check_requirements(), install_main(), install_tasks(), locale_languages_configure_form_submit(), locale_languages_delete_form(), locale_languages_delete_form_submit(), locale_languages_overview_form_submit(), locale_languages_predefined_form_submit(), locale_translate_delete(), locale_translate_edit_form(), locale_translate_edit_form_submit(), locale_translate_import_form_submit(), menu_delete_menu_confirm_submit(), menu_edit_item_submit(), menu_edit_item_validate(), menu_item_delete_form_submit(), menu_reset_item_confirm_submit(), node_form_submit(), node_mass_update(), node_multiple_delete_confirm_submit(), node_node_type(), node_revision_delete_confirm_submit(), node_revision_revert_confirm_submit(), node_type_delete_confirm_submit(), node_type_form_submit(), openid_authentication_page(), openid_user_delete(), openid_user_identities(), page_get_cache(), path_admin_form_submit(), profile_admin_overview_submit(), profile_field_delete_submit(), profile_field_form_submit(), search_admin_settings_validate(), search_wipe_confirm_submit(), system_clear_cache_submit(), system_ip_blocking_delete_submit(), system_ip_blocking_form_submit(), system_main_admin_page(), system_modules_submit(), system_modules_uninstall_submit(), system_modules_uninstall_validate(), system_run_cron(), system_site_information_settings_validate(), system_theme_settings_submit(), system_themes_form_submit(), taxonomy_form_term_submit(), taxonomy_form_vocabulary_submit(), taxonomy_term_confirm_delete_submit(), taxonomy_vocabulary_confirm_delete_submit(), taxonomy_vocabulary_confirm_reset_alphabetical_submit(), theme_install_page(), theme_node_preview(), theme_update_page(), trigger_assign_form_submit(), trigger_unassign_submit(), update_check_requirements(), update_manual_status(), user_admin_account_submit(), user_admin_perm_submit(), user_admin_role_submit(), user_confirm_delete_submit(), user_edit_submit(), user_pass_reset(), user_pass_submit(), and user_profile_form_submit().

drupal_unpack ( obj,
field = 'data' 
)

Unserializes and appends elements from a serialized string.

Parameters:
$obj The object to which the elements are appended.
$field The attribute of $obj whose value should be unserialized.

Definition at line 694 of file bootstrap.inc.

References $value.

Referenced by comment_edit(), comment_reply(), and sess_read().

drupal_unset_globals (  ) 

Unsets all disallowed global variables. See $allowed for what's allowed.

Definition at line 307 of file bootstrap.inc.

References $value.

Referenced by _drupal_bootstrap().

drupal_validate_utf8 ( text  ) 

Checks whether a string is valid UTF-8.

All functions designed to filter input should use drupal_validate_utf8 to ensure they operate on valid UTF-8 strings to prevent bypass of the filter.

When text containing an invalid UTF-8 lead byte (0xC0 - 0xFF) is presented as UTF-8 to Internet Explorer 6, the program may misinterpret subsequent bytes. When these subsequent bytes are HTML control characters such as quotes or angle brackets, parts of the text that were deemed safe by filters end up in locations that are potentially unsafe; An onerror attribute that is outside of a tag, and thus deemed safe by a filter, can be interpreted by the browser as if it were inside the tag.

This function exploits preg_match behaviour (since PHP 4.3.5) when used with the u modifier, as a fast way to find invalid UTF-8. When the matched string contains an invalid byte sequence, it will fail silently.

preg_match may not fail on 4 and 5 octet sequences, even though they are not supported by the specification.

The specific preg_match behaviour is present since PHP 4.3.5.

Parameters:
$text The text to check.
Returns:
TRUE if the text is valid UTF-8, FALSE if not.

Definition at line 753 of file bootstrap.inc.

Referenced by check_plain().

get_t (  ) 

Return the name of the localisation function. Use in code that needs to run both during installation and normal operation.

Definition at line 1080 of file bootstrap.inc.

Referenced by _form_validate(), _locale_batch_build(), _locale_import_message(), _unicode_check(), batch_process(), batch_set(), db_check_setup(), db_status_report(), theme_form_element(), and unicode_requirements().

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.

Returns:
IP address of client machine, adjusted for reverse proxy.

Definition at line 1169 of file bootstrap.inc.

References variable_get().

Referenced by _drupal_bootstrap(), drupal_anonymous_user(), flood_is_allowed(), flood_register_event(), sess_write(), system_ip_blocking_form_validate(), and watchdog().

Here is the call graph for this function:

language_default ( property = NULL  ) 

language_list ( field = 'language',
reset = FALSE 
)

page_get_cache (  ) 

Retrieve the current page from the cache.

Note: we do not serve cached pages when status messages are waiting (from a redirected form submission which was completed).

Definition at line 547 of file bootstrap.inc.

References cache_get(), drupal_set_message(), and request_uri().

Referenced by _drupal_bootstrap().

Here is the call graph for this function:

referer_uri (  ) 

Return the URI of the referring page.

Definition at line 708 of file bootstrap.inc.

Referenced by watchdog().

request_uri (  ) 

Since $_SERVER['REQUEST_URI'] is only available on Apache, we generate an equivalent using other environment variables.

Definition at line 764 of file bootstrap.inc.

Referenced by page_get_cache(), page_set_cache(), system_clean_url_settings(), theme_install_page(), and watchdog().

timer_read ( name  ) 

Read the current timer value without stopping the timer.

Parameters:
name The name of the timer.
Returns:
The current timer value in ms.

Definition at line 207 of file bootstrap.inc.

References $name.

Referenced by _batch_process(), and timer_stop().

timer_start ( name  ) 

Start the timer with the specified name. If you start and stop the same timer multiple times, the measured intervals will be accumulated.

Parameters:
name The name of the timer.

Definition at line 191 of file bootstrap.inc.

References $name.

Referenced by _batch_process(), and _drupal_bootstrap().

timer_stop ( name  ) 

Stop the timer with the specified name.

Parameters:
name The name of the timer.
Returns:
A timer array. The array contains the number of times the timer has been started and stopped (count) and the accumulated timer value in ms (time).

Definition at line 232 of file bootstrap.inc.

References $name, and timer_read().

Here is the call graph for this function:

variable_del ( name  ) 

Unset a persistent variable.

Parameters:
$name The name of the variable to undefine.

Definition at line 531 of file bootstrap.inc.

References $name, cache_clear_all(), and db_query().

Referenced by drupal_cron_cleanup(), drupal_cron_run(), install_tasks(), menu_rebuild(), node_type_form_submit(), system_theme_settings_submit(), system_themes_form_submit(), and update_settings_submit().

Here is the call graph for this function:

variable_get ( name,
default 
)

Return a persistent variable.

Parameters:
$name The name of the variable to return.
$default The default value to use if this variable has never been set.
Returns:
The value of the variable.

Definition at line 496 of file bootstrap.inc.

References $name.

Referenced by _db_query(), _drupal_bootstrap(), _drupal_flush_css_js(), _drupal_maintenance_theme(), _forum_parent_select(), _locale_export_po_generate(), _locale_invalidate_js(), _locale_rebuild_js(), _menu_site_is_offline(), _update_build_fetch_url(), _update_cron_notify(), _update_refresh(), actions_do(), aggregator_admin_settings(), aggregator_categorize_items(), aggregator_page_categories(), aggregator_page_category(), aggregator_page_last(), aggregator_page_rss(), aggregator_page_sources(), block_admin_display(), block_admin_display_form(), blog_feed_last(), blog_feed_user(), blog_page_last(), blog_page_user(), book_admin_settings(), cache_clear_all(), cache_get(), DrupalTests::cleanupBeforeRun(), contact_admin_settings(), contact_mail_page(), contact_site_page(), contact_user_page(), DrupalWebTestCase::curlConnect(), dblog_admin_settings(), drupal_access_denied(), drupal_cron_cleanup(), drupal_cron_run(), drupal_error_handler(), drupal_get_css(), drupal_get_js(), drupal_get_private_key(), drupal_http_request(), drupal_init_language(), drupal_init_path(), drupal_is_denied(), drupal_is_front_page(), drupal_mail(), drupal_mail_send(), drupal_match_path(), drupal_not_found(), drupal_page_cache_header(), drupal_page_footer(), drupal_process_form(), drupal_site_offline(), drupal_system_listing(), drupal_urlencode(), drupal_valid_token(), expand_date(), file_create_url(), file_directory_path(), file_directory_temp(), file_munge_filename(), file_save_upload(), filter_admin_delete(), filter_admin_delete_submit(), filter_admin_format_form(), filter_admin_overview(), format_date(), forum_admin_settings(), forum_form_container(), forum_form_forum(), forum_form_submit(), forum_overview(), forum_page(), image_gd_close(), image_gd_settings(), image_get_toolkit(), init_theme(), install_tasks(), ip_address(), language_default(), language_initialize(), language_list(), language_url_rewrite(), locale_add_language(), locale_languages_configure_form(), menu_configure(), menu_execute_active_handler(), menu_get_ancestors(), menu_primary_links(), menu_secondary_links(), menu_tree_page_data(), node_configure(), node_form(), node_object_prepare(), node_type_form(), page_set_cache(), path_admin_form(), search_admin_settings(), search_admin_settings_validate(), sess_write(), DrupalWebTestCase::setUp(), statistics_access_logging_settings(), statistics_top_pages(), statistics_top_referrers(), statistics_top_visitors(), system_admin_theme_settings(), system_clean_url_settings(), system_date_time_settings(), system_error_reporting_settings(), system_file_system_settings(), system_image_toolkit_settings(), system_performance_settings(), system_rss_feeds_settings(), system_site_information_settings(), system_site_maintenance_settings(), system_theme_settings(), system_themes_form(), system_themes_form_submit(), t(), taxonomy_form_term(), taxonomy_term_page(), template_preprocess_aggregator_item(), template_preprocess_maintenance_page(), template_preprocess_page(), theme_aggregator_page_opml(), theme_aggregator_page_rss(), theme_get_setting(), theme_get_settings(), theme_update_report(), theme_username(), update_fix_d6_requirements(), update_settings(), upload_admin_settings(), url(), user_admin_settings(), user_hash_password(), and user_needs_new_hash().

variable_init ( conf = array()  ) 

Load the persistent variable table.

The variable table is composed of values that have been saved in the table with variable_set() as well as those explicitly specified in the configuration file.

Definition at line 466 of file bootstrap.inc.

References $name, $result, $value, cache_get(), cache_set(), db_fetch_object(), and db_query().

Referenced by _drupal_bootstrap(), and DrupalWebTestCase::refreshVariables().

Here is the call graph for this function:

variable_set ( name,
value 
)

watchdog ( type,
message,
variables = array(),
severity = WATCHDOG_NOTICE,
link = NULL 
)

Log a system message.

Parameters:
$type The category to which this message belongs.
$message The message to store in the log. See t() for documentation on how $message and $variables interact. Keep $message translatable by not concatenating dynamic values into it!
$variables Array of variables to replace in the message on display or NULL if message is already translated or not possible to translate.
$severity The severity of the message, as per RFC 3164
$link A link to associate with the message.
See also:
watchdog_severity_levels()

Definition at line 804 of file bootstrap.inc.

References $type, ip_address(), module_implements(), module_invoke(), referer_uri(), and request_uri().

Referenced by _comment_delete_thread(), _form_validate(), _locale_export_po(), _locale_import_po(), _locale_rebuild_js(), _update_refresh(), actions_do(), actions_save(), actions_synchronize(), aggregator_form_category_submit(), aggregator_form_feed_submit(), book_admin_edit_submit(), comment_admin_overview_submit(), contact_admin_delete_submit(), contact_admin_edit_submit(), contact_mail_page_submit(), contact_mail_user_submit(), drupal_access_denied(), drupal_convert_to_utf8(), drupal_cron_cleanup(), drupal_cron_run(), drupal_error_handler(), drupal_mail(), drupal_not_found(), drupal_xml_parser_create(), file_check_directory(), file_copy(), file_save_upload(), forum_confirm_delete_submit(), image_toolkit_invoke(), locale_add_language(), locale_languages_delete_form_submit(), locale_translate_import_form_submit(), menu_delete_menu_confirm_submit(), menu_item_delete_form_submit(), node_form_submit(), node_revision_delete_confirm_submit(), node_revision_revert_confirm_submit(), node_type_delete_confirm_submit(), node_type_form_submit(), profile_field_delete_submit(), profile_field_form_submit(), search_view(), system_ip_blocking_delete_submit(), taxonomy_form_term_submit(), taxonomy_form_vocabulary_submit(), taxonomy_term_confirm_delete_submit(), taxonomy_vocabulary_confirm_delete_submit(), taxonomy_vocabulary_confirm_reset_alphabetical_submit(), trigger_unassign_submit(), user_edit_validate(), user_logout(), user_pass_reset(), user_pass_submit(), and user_profile_form_validate().

Here is the call graph for this function:


Generated on Mon Jun 2 15:07:59 2008 for SimpleTest by  1.5.5