You are here

public function MongodbFlood::clear in MongoDB 8

Implements Drupal\Core\Flood\FloodInterface::clear().

Overrides FloodInterface::clear

File

src/MongodbFlood.php, line 63
Definition of Drupal\mongodb\MongodbFlood.

Class

MongodbFlood
Defines the mongodb flood backend.

Namespace

Drupal\mongodb

Code

public function clear($name, $identifier = NULL) {
  if (!isset($identifier)) {
    $identifier = $this
      ->request()
      ->getClientIp();
  }
  $key = array(
    'event' => $name,
    'identifier' => $identifier,
  );
  $this->mongo
    ->get('flood')
    ->remove($key);
}