You are here

class WebprofilerMiddleware in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/StackMiddleware/WebprofilerMiddleware.php \Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware
  2. 8.2 webprofiler/src/StackMiddleware/WebprofilerMiddleware.php \Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware
  3. 4.x webprofiler/src/StackMiddleware/WebprofilerMiddleware.php \Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware

Class WebprofilerMiddleware

Hierarchy

  • class \Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware implements \Symfony\Component\HttpKernel\HttpKernelInterface

Expanded class hierarchy of WebprofilerMiddleware

1 string reference to 'WebprofilerMiddleware'
webprofiler.services.yml in webprofiler/webprofiler.services.yml
webprofiler/webprofiler.services.yml
1 service uses WebprofilerMiddleware
http_middleware.webprofiler in webprofiler/webprofiler.services.yml
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware

File

webprofiler/src/StackMiddleware/WebprofilerMiddleware.php, line 12

Namespace

Drupal\webprofiler\StackMiddleware
View source
class WebprofilerMiddleware implements HttpKernelInterface {

  /**
   * The decorated kernel.
   *
   * @var \Symfony\Component\HttpKernel\HttpKernelInterface
   */
  protected $httpKernel;

  /**
   * Constructs a WebprofilerMiddleware object.
   *
   * @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel
   *   The decorated kernel.
   */
  public function __construct(HttpKernelInterface $http_kernel) {
    $this->httpKernel = $http_kernel;
  }

  /**
   * {@inheritdoc}
   */
  public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
    foreach (Database::getAllConnectionInfo() as $key => $info) {
      Database::startLog('webprofiler', $key);
    }
    return $this->httpKernel
      ->handle($request, $type, $catch);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
WebprofilerMiddleware::$httpKernel protected property The decorated kernel.
WebprofilerMiddleware::handle public function Handles a Request to convert it to a Response.
WebprofilerMiddleware::__construct public function Constructs a WebprofilerMiddleware object.