class StreamedResponseListener in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php \Symfony\Component\HttpKernel\EventListener\StreamedResponseListener
StreamedResponseListener is responsible for sending the Response to the client.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\HttpKernel\EventListener\StreamedResponseListener implements EventSubscriberInterface
Expanded class hierarchy of StreamedResponseListener
File
- vendor/
symfony/ http-kernel/ EventListener/ StreamedResponseListener.php, line 25
Namespace
Symfony\Component\HttpKernel\EventListenerView source
class StreamedResponseListener implements EventSubscriberInterface {
/**
* Filters the Response.
*
* @param FilterResponseEvent $event A FilterResponseEvent instance
*/
public function onKernelResponse(FilterResponseEvent $event) {
if (!$event
->isMasterRequest()) {
return;
}
$response = $event
->getResponse();
if ($response instanceof StreamedResponse) {
$response
->send();
}
}
public static function getSubscribedEvents() {
return array(
KernelEvents::RESPONSE => array(
'onKernelResponse',
-1024,
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StreamedResponseListener:: |
public static | function |
Returns an array of event names this subscriber wants to listen to. Overrides EventSubscriberInterface:: |
|
StreamedResponseListener:: |
public | function | Filters the Response. |