function TestSessionBag::clear

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/session_test/src/Session/TestSessionBag.php \Drupal\session_test\Session\TestSessionBag::clear()
  2. 10 core/modules/system/tests/modules/session_test/src/Session/TestSessionBag.php \Drupal\session_test\Session\TestSessionBag::clear()
  3. 11.x core/modules/system/tests/modules/session_test/src/Session/TestSessionBag.php \Drupal\session_test\Session\TestSessionBag::clear()

File

core/modules/system/tests/modules/session_test/src/Session/TestSessionBag.php, line 89

Class

TestSessionBag
Test session container.

Namespace

Drupal\session_test\Session

Code

public function clear() {
    $return = $this->attributes;
    $this->attributes = [];
    return $return;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.