You are here

public function MemoryBackend::clear in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Flood/MemoryBackend.php \Drupal\Core\Flood\MemoryBackend::clear()
  2. 9 core/lib/Drupal/Core/Flood/MemoryBackend.php \Drupal\Core\Flood\MemoryBackend::clear()

File

core/lib/Drupal/Core/Flood/MemoryBackend.php, line 50

Class

MemoryBackend
Defines the memory flood backend. This is used for testing.

Namespace

Drupal\Core\Flood

Code

public function clear($name, $identifier = NULL) {
  if (!isset($identifier)) {
    $identifier = $this->requestStack
      ->getCurrentRequest()
      ->getClientIp();
  }
  unset($this->events[$name][$identifier]);
}