class NoreqnewpassFlood in No Request New Password 8
Defines the database flood backend. This is the default Drupal backend.
Hierarchy
- class \Drupal\noreqnewpass\Services\NoreqnewpassFlood
Expanded class hierarchy of NoreqnewpassFlood
File
- src/
Services/ NoreqnewpassFlood.php, line 11
Namespace
Drupal\noreqnewpass\ServicesView source
class NoreqnewpassFlood {
/**
* The flood service.
*
* @var \Drupal\Core\Flood\FloodInterface
*/
protected $flood;
/**
* Constructs a new UserLoginForm.
*
* @param \Drupal\Core\Flood\FloodInterface $flood
* The flood service.
*/
public function __construct(FloodInterface $flood) {
$this->flood = $flood;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('flood'));
}
/**
* Implements Drupal\noreqnewpass\NoreqnewpassFlood::register().
*/
public function noreqnewpassregister($name, $window = 3600, $identifier = NULL) {
$this->flood
->register($name, $window = 3600, $identifier);
}
/**
* Implements Drupal\noreqnewpass\NoreqnewpassFlood::clear().
*/
public function noreqnewpassclear($name, $identifier = NULL) {
$this->flood
->clear($name, $identifier);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NoreqnewpassFlood:: |
protected | property | The flood service. | |
NoreqnewpassFlood:: |
public static | function | ||
NoreqnewpassFlood:: |
public | function | Implements Drupal\noreqnewpass\NoreqnewpassFlood::clear(). | |
NoreqnewpassFlood:: |
public | function | Implements Drupal\noreqnewpass\NoreqnewpassFlood::register(). | |
NoreqnewpassFlood:: |
public | function | Constructs a new UserLoginForm. |