You are here

public static function ServiceContainer::reset in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/ServiceContainer.php \ServiceContainer::reset()

Reset the internal cache.

Note: This is just thought for tests.

3 calls to ServiceContainer::reset()
DatabaseStorageExpirableTest::setUp in lib/Drupal/service_container/Tests/KeyValue/DatabaseStorageExpirableTest.php
MemoryStorageTest::setUp in lib/Drupal/service_container/Tests/KeyValue/MemoryStorageTest.php
service_container_modules_enabled in ./service_container.module
Implements hook_modules_enabled().

File

lib/ServiceContainer.php, line 75
Contains ServiceContainer

Class

ServiceContainer
Static Service Container wrapper extension - initializes the container.

Code

public static function reset() {
  static::getContainerBuilder()
    ->reset();
  static::$container = NULL;
}