Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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 |
StreamedResponseListener.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\HttpFoundation\StreamedResponse;
15 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
16 use Symfony\Component\HttpKernel\KernelEvents;
17 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
18
19 /**
20 * StreamedResponseListener is responsible for sending the Response
21 * to the client.
22 *
23 * @author Fabien Potencier <fabien@symfony.com>
24 */
25 class StreamedResponseListener implements EventSubscriberInterface
26 {
27 /**
28 * Filters the Response.
29 *
30 * @param FilterResponseEvent $event A FilterResponseEvent instance
31 */
32 public function onKernelResponse(FilterResponseEvent $event)
33 {
34 if (!$event->isMasterRequest()) {
35 return;
36 }
37
38 $response = $event->getResponse();
39
40 if ($response instanceof StreamedResponse) {
41 $response->send();
42 }
43 }
44
45 public static function getSubscribedEvents()
46 {
47 return array(
48 KernelEvents::RESPONSE => array('onKernelResponse', -1024),
49 );
50 }
51 }
52