public function MockArraySessionStorage::clear

Clear all session data in memory.

Overrides SessionStorageInterface::clear

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php, line 172

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function clear() {

  // clear out the bags
  foreach ($this->bags as $bag) {
    $bag
      ->clear();
  }

  // clear out the session
  $this->data = array();

  // reconnect the bags to the session
  $this
    ->loadSession();
}