class BatApiMiddleware in Booking and Availability Management API 8
Provides a HTTP middleware.
Hierarchy
- class \Drupal\bat_api\StackMiddleware\BatApiMiddleware implements \Symfony\Component\HttpKernel\HttpKernelInterface
Expanded class hierarchy of BatApiMiddleware
1 string reference to 'BatApiMiddleware'
1 service uses BatApiMiddleware
File
- src/
StackMiddleware/ BatApiMiddleware.php, line 15 - Contains \Drupal\bat_api\StackMiddleware\BatApiMiddleware.php
Namespace
Drupal\bat_api\StackMiddlewareView source
class BatApiMiddleware implements HttpKernelInterface {
/**
* The wrapped HTTP kernel.
*
* @var \Symfony\Component\HttpKernel\HttpKernelInterface
*/
protected $httpKernel;
/**
* Constructs a BatApiMiddleware 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) {
if ($format = $request
->get('_format')) {
$request
->setRequestFormat($format);
}
return $this->httpKernel
->handle($request, $type, $catch);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BatApiMiddleware:: |
protected | property | The wrapped HTTP kernel. | |
BatApiMiddleware:: |
public | function | Handles a Request to convert it to a Response. | |
BatApiMiddleware:: |
public | function | Constructs a BatApiMiddleware object. |