You are here

public function LegacyBackend::register in Service Container 7.2

Same name and namespace in other branches
  1. 7 src/Flood/LegacyBackend.php \Drupal\service_container\Flood\LegacyBackend::register()

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

Registers an event for the current visitor to the flood control mechanism.

Parameters

$name: The name of an event.

$window: Optional number of seconds before this event expires. Defaults to 3600 (1 hour). Typically uses the same value as the flood_is_allowed() $window parameter. Expired events are purged on cron run to prevent the flood table from growing indefinitely.

$identifier: Optional identifier (defaults to the current user's IP address).

Overrides FloodInterface::register

File

src/Flood/LegacyBackend.php, line 63
Definition of Drupal\service_container\Flood\LegacyBackend.

Class

LegacyBackend
Defines the database flood backend. This is the default Drupal backend. @codeCoverageIgnore

Namespace

Drupal\service_container\Flood

Code

public function register($name, $window = 3600, $identifier = NULL) {
  $this->drupal7
    ->flood_register_event($name, $window, $identifier);
}