public function MemoryBackend::register

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

Overrides FloodInterface::register

File

drupal/core/lib/Drupal/Core/Flood/MemoryBackend.php, line 23
Definition of Drupal\Core\Flood\MemoryBackend.

Class

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

Namespace

Drupal\Core\Flood

Code

public function register($name, $window = 3600, $identifier = NULL) {
  if (!isset($identifier)) {
    $identifier = ip_address();
  }

  // We can't use REQUEST_TIME here, because that would not guarantee
  // uniqueness.
  $time = microtime(true);
  $this->events[$name][$identifier][$time + $window] = $time;
}