class KernelEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Event/KernelEvent.php \Symfony\Component\HttpKernel\Event\KernelEvent
Base class for events thrown in the HttpKernel component.
@author Bernhard Schussek <bschussek@gmail.com>
Hierarchy
- class \Symfony\Component\EventDispatcher\Event
- class \Symfony\Component\HttpKernel\Event\KernelEvent
Expanded class hierarchy of KernelEvent
2 files declare their use of KernelEvent
- DebugHandlersListener.php in vendor/
symfony/ http-kernel/ EventListener/ DebugHandlersListener.php - RoutePreloader.php in core/
lib/ Drupal/ Core/ Routing/ RoutePreloader.php - Contains \Drupal\Core\Routing\RoutePreloader.
File
- vendor/
symfony/ http-kernel/ Event/ KernelEvent.php, line 23
Namespace
Symfony\Component\HttpKernel\EventView source
class KernelEvent extends Event {
/**
* The kernel in which this event was thrown.
*
* @var HttpKernelInterface
*/
private $kernel;
/**
* The request the kernel is currently processing.
*
* @var Request
*/
private $request;
/**
* The request type the kernel is currently processing. One of
* HttpKernelInterface::MASTER_REQUEST and HttpKernelInterface::SUB_REQUEST.
*
* @var int
*/
private $requestType;
public function __construct(HttpKernelInterface $kernel, Request $request, $requestType) {
$this->kernel = $kernel;
$this->request = $request;
$this->requestType = $requestType;
}
/**
* Returns the kernel in which this event was thrown.
*
* @return HttpKernelInterface
*/
public function getKernel() {
return $this->kernel;
}
/**
* Returns the request the kernel is currently processing.
*
* @return Request
*/
public function getRequest() {
return $this->request;
}
/**
* Returns the request type the kernel is currently processing.
*
* @return int One of HttpKernelInterface::MASTER_REQUEST and
* HttpKernelInterface::SUB_REQUEST
*/
public function getRequestType() {
return $this->requestType;
}
/**
* Checks if this is a master request.
*
* @return bool True if the request is a master request
*/
public function isMasterRequest() {
return HttpKernelInterface::MASTER_REQUEST === $this->requestType;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
public | function | Returns the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Gets the event's name. | |
Event:: |
public | function | Returns whether further event listeners should be triggered. | |
Event:: |
public | function | Stores the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Sets the event's name property. | |
Event:: |
public | function | Stops the propagation of the event to further event listeners. | |
KernelEvent:: |
private | property | The kernel in which this event was thrown. | |
KernelEvent:: |
private | property | The request the kernel is currently processing. | |
KernelEvent:: |
private | property | The request type the kernel is currently processing. One of HttpKernelInterface::MASTER_REQUEST and HttpKernelInterface::SUB_REQUEST. | |
KernelEvent:: |
public | function | Returns the kernel in which this event was thrown. | |
KernelEvent:: |
public | function | Returns the request the kernel is currently processing. | |
KernelEvent:: |
public | function | Returns the request type the kernel is currently processing. | |
KernelEvent:: |
public | function | Checks if this is a master request. | |
KernelEvent:: |
public | function | 4 |