You are here

function drupal_static_reset in Drupal 7

Same name and namespace in other branches
  1. 8 core/includes/bootstrap.inc \drupal_static_reset()
  2. 9 core/includes/bootstrap.inc \drupal_static_reset()

Resets one or all centrally stored static variable(s).

Parameters

$name: Name of the static variable to reset. Omit to reset all variables. Resetting all variables should only be used, for example, for running unit tests with a clean environment.

112 calls to drupal_static_reset()
block_page_build in modules/block/block.module
Implements hook_page_build().
book_node_delete in modules/book/book.module
Implements hook_node_delete().
BootstrapGetFilenameTestCase::testDrupalGetFilename in modules/simpletest/tests/bootstrap.test
Test that drupal_get_filename() works correctly when the file is not found in the database.
BootstrapIPAddressTestCase::setUp in modules/simpletest/tests/bootstrap.test
Sets up a Drupal site for running functional and integration tests.
BootstrapIPAddressTestCase::tearDown in modules/simpletest/tests/bootstrap.test
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.

... See full list

File

includes/bootstrap.inc, line 3730
Functions that need to be loaded on every Drupal request.

Code

function drupal_static_reset($name = NULL) {
  drupal_static($name, NULL, TRUE);
}