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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ValidateRequestListener.php
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\EventListener;
13
14 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
16 use Symfony\Component\HttpKernel\KernelEvents;
17
18 /**
19 * Validates Requests.
20 *
21 * @author Magnus Nordlander <magnus@fervo.se>
22 */
23 class ValidateRequestListener implements EventSubscriberInterface
24 {
25 /**
26 * Performs the validation.
27 */
28 public function onKernelRequest(GetResponseEvent $event)
29 {
30 if (!$event->isMasterRequest()) {
31 return;
32 }
33 $request = $event->getRequest();
34
35 if ($request::getTrustedProxies()) {
36 $request->getClientIps();
37 }
38
39 $request->getHost();
40 }
41
42 /**
43 * {@inheritdoc}
44 */
45 public static function getSubscribedEvents()
46 {
47 return [
48 KernelEvents::REQUEST => [
49 ['onKernelRequest', 256],
50 ],
51 ];
52 }
53 }
54