12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- namespace Symfony\Component\HttpKernel\Event;
- use Symfony\Component\EventDispatcher\Event;
- use Symfony\Component\HttpFoundation\Request;
- use Symfony\Component\HttpKernel\HttpKernelInterface;
- class KernelEvent extends Event
- {
- private $kernel;
- private $request;
- private $requestType;
-
- public function __construct(HttpKernelInterface $kernel, Request $request, ?int $requestType)
- {
- $this->kernel = $kernel;
- $this->request = $request;
- $this->requestType = $requestType;
- }
-
- public function getKernel()
- {
- return $this->kernel;
- }
-
- public function getRequest()
- {
- return $this->request;
- }
-
- public function getRequestType()
- {
- return $this->requestType;
- }
-
- public function isMasterRequest()
- {
- return HttpKernelInterface::MASTER_REQUEST === $this->requestType;
- }
- }
|