You are here

public function Predis::__construct in Redis 8

Same name in this branch
  1. 8 src/Lock/Predis.php \Drupal\redis\Lock\Predis::__construct()
  2. 8 src/Flood/Predis.php \Drupal\redis\Flood\Predis::__construct()
  3. 8 src/Queue/Predis.php \Drupal\redis\Queue\Predis::__construct()
  4. 8 src/Cache/Predis.php \Drupal\redis\Cache\Predis::__construct()
  5. 8 src/PersistentLock/Predis.php \Drupal\redis\PersistentLock\Predis::__construct()

Construct the PhpRedis flood backend.

Parameters

\Drupal\redis\ClientFactory $client_factory: The database connection which will be used to store the flood event information.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack used to retrieve the current request.

File

src/Flood/Predis.php, line 38

Class

Predis
Defines the database flood backend. This is the default Drupal backend.

Namespace

Drupal\redis\Flood

Code

public function __construct(ClientFactory $client_factory, RequestStack $request_stack) {
  $this->client = $client_factory
    ->getClient();
  $this->requestStack = $request_stack;
}