Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

KernelEvent.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 2.17 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Symfony\Component\HttpKernel\Event;
13   
14  use Symfony\Component\EventDispatcher\Event;
15  use Symfony\Component\HttpFoundation\Request;
16  use Symfony\Component\HttpKernel\HttpKernelInterface;
17   
18  /**
19   * Base class for events thrown in the HttpKernel component.
20   *
21   * @author Bernhard Schussek <bschussek@gmail.com>
22   */
23  class KernelEvent extends Event
24  {
25      private $kernel;
26      private $request;
27      private $requestType;
28   
29      /**
30       * @param HttpKernelInterface $kernel      The kernel in which this event was thrown
31       * @param Request             $request     The request the kernel is currently processing
32       * @param int                 $requestType The request type the kernel is currently processing; one of
33       *                                         HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST
34       */
35      public function __construct(HttpKernelInterface $kernel, Request $request, $requestType)
36      {
37          $this->kernel = $kernel;
38          $this->request = $request;
39          $this->requestType = $requestType;
40      }
41   
42      /**
43       * Returns the kernel in which this event was thrown.
44       *
45       * @return HttpKernelInterface
46       */
47      public function getKernel()
48      {
49          return $this->kernel;
50      }
51   
52      /**
53       * Returns the request the kernel is currently processing.
54       *
55       * @return Request
56       */
57      public function getRequest()
58      {
59          return $this->request;
60      }
61   
62      /**
63       * Returns the request type the kernel is currently processing.
64       *
65       * @return int One of HttpKernelInterface::MASTER_REQUEST and
66       *             HttpKernelInterface::SUB_REQUEST
67       */
68      public function getRequestType()
69      {
70          return $this->requestType;
71      }
72   
73      /**
74       * Checks if this is a master request.
75       *
76       * @return bool True if the request is a master request
77       */
78      public function isMasterRequest()
79      {
80          return HttpKernelInterface::MASTER_REQUEST === $this->requestType;
81      }
82  }
83