<?php
declare(strict_types=0);
/*
* WellCommerce Foundation
*
* This file is part of the WellCommerce package.
*
* (c) Adam Piotrowski <adam@wellcommerce.org>, Adrian Potepa <adrian@wellcommerce.org>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
*/
namespace WellCommerce\Bundle\AppBundle\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use WellCommerce\Bundle\CoreBundle\Helper\Security\SecurityHelperInterface;
use WellCommerce\Bundle\OrderBundle\Provider\Front\OrderProviderInterface;
/**
* Class HttpCacheSubscriber
*
* @package WellCommerce\Bundle\AppBundle\EventListener
*/
class HttpCacheSubscriber implements EventSubscriberInterface
{
/**
* @var SecurityHelperInterface
*/
protected $securityHelper;
/**
* @var OrderProviderInterface
*/
protected $orderProvider;
public function __construct(SecurityHelperInterface $securityHelper, OrderProviderInterface $orderProvider)
{
$this->securityHelper = $securityHelper;
$this->orderProvider = $orderProvider;
}
public static function getSubscribedEvents()
{
return [
KernelEvents::RESPONSE => ['onKernelResponse', -1200],
];
}
public function onKernelResponse(FilterResponseEvent $event)
{
if (!$event->isMasterRequest()) {
return;
}
}
}