function TestMiddleware::__construct
Same name in other branches
- 9 core/modules/system/tests/modules/httpkernel_test/src/HttpKernel/TestMiddleware.php \Drupal\httpkernel_test\HttpKernel\TestMiddleware::__construct()
- 10 core/modules/system/tests/modules/http_kernel_test/src/HttpKernel/TestMiddleware.php \Drupal\http_kernel_test\HttpKernel\TestMiddleware::__construct()
- 11.x core/modules/system/tests/modules/http_kernel_test/src/HttpKernel/TestMiddleware.php \Drupal\http_kernel_test\HttpKernel\TestMiddleware::__construct()
Constructs a new TestMiddleware object.
Parameters
\Symfony\Component\HttpKernel\HttpKernelInterface $kernel: The decorated kernel.
mixed $optional_argument: (optional) An optional argument.
File
-
core/
modules/ system/ tests/ modules/ httpkernel_test/ src/ HttpKernel/ TestMiddleware.php, line 35
Class
- TestMiddleware
- Provides a test middleware.
Namespace
Drupal\httpkernel_test\HttpKernelCode
public function __construct(HttpKernelInterface $kernel, $optional_argument = NULL) {
$this->kernel = $kernel;
$this->optionalArgument = $optional_argument;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.