function BanMiddleware::__construct

Same name in other branches
  1. 9 core/modules/ban/src/BanMiddleware.php \Drupal\ban\BanMiddleware::__construct()
  2. 8.9.x core/modules/ban/src/BanMiddleware.php \Drupal\ban\BanMiddleware::__construct()
  3. 11.x core/modules/ban/src/BanMiddleware.php \Drupal\ban\BanMiddleware::__construct()

Constructs a BanMiddleware object.

Parameters

\Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: The decorated kernel.

\Drupal\ban\BanIpManagerInterface $manager: The ban IP manager.

File

core/modules/ban/src/BanMiddleware.php, line 37

Class

BanMiddleware
Provides a HTTP middleware to implement IP based banning.

Namespace

Drupal\ban

Code

public function __construct(HttpKernelInterface $http_kernel, BanIpManagerInterface $manager) {
    $this->httpKernel = $http_kernel;
    $this->banIpManager = $manager;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.