$47 GRAYBYTE WORDPRESS FILE MANAGER $27

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/php55/usr/share/pear/Symfony/Component/HttpKernel/EventListener/

HOME
Current File : /opt/alt/php55/usr/share/pear/Symfony/Component/HttpKernel/EventListener//EsiListener.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpKernel\EventListener;

use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\HttpCache\Esi;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
 * EsiListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for ESI.
 *
 * @author Fabien Potencier <[email protected]>
 */
class EsiListener implements EventSubscriberInterface
{
    private $esi;

    /**
     * Constructor.
     *
     * @param Esi $esi An ESI instance
     */
    public function __construct(Esi $esi = null)
    {
        $this->esi = $esi;
    }

    /**
     * Filters the Response.
     *
     * @param FilterResponseEvent $event A FilterResponseEvent instance
     */
    public function onKernelResponse(FilterResponseEvent $event)
    {
        if (!$event->isMasterRequest() || null === $this->esi) {
            return;
        }

        $this->esi->addSurrogateControl($event->getResponse());
    }

    public static function getSubscribedEvents()
    {
        return array(
            KernelEvents::RESPONSE => 'onKernelResponse',
        );
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
ErrorsLoggerListener.php
1.198 KB
18 Dec 2019 11.24 AM
root / root
0644
EsiListener.php
1.399 KB
18 Dec 2019 11.24 AM
root / root
0644
ExceptionListener.php
4.223 KB
18 Dec 2019 11.24 AM
root / root
0644
FragmentListener.php
3.384 KB
18 Dec 2019 11.24 AM
root / root
0644
LocaleListener.php
3.328 KB
18 Dec 2019 11.24 AM
root / root
0644
ProfilerListener.php
5.384 KB
18 Dec 2019 11.24 AM
root / root
0644
ResponseListener.php
1.368 KB
18 Dec 2019 11.24 AM
root / root
0644
RouterListener.php
6.544 KB
18 Dec 2019 11.24 AM
root / root
0644
SessionListener.php
1.414 KB
18 Dec 2019 11.24 AM
root / root
0644
StreamedResponseListener.php
1.285 KB
18 Dec 2019 11.24 AM
root / root
0644
TestSessionListener.php
2.563 KB
18 Dec 2019 11.24 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF