<?php

namespace KupShop\KupShopBundle\Event;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * @deprecated Use EarlyDynamicRouteEvent
 */
class DynamicRouteEvent extends Event
{
    public const NAME = 'kupshop.dynamic_route';

    /** @var Request */
    protected $request;

    /** @var string */
    protected $path;

    /** @var Response */
    protected $response;

    /** @var HttpKernel */
    protected $httpKernel;

    public function __construct($httpKernel, $request, $path)
    {
        $this->httpKernel = $httpKernel;
        $this->request = $request;
        $this->path = $path;
    }

    /**
     * @return Response
     */
    public function getResponse()
    {
        return $this->response;
    }

    public function setResponse($response)
    {
        $this->response = $response;

        return $this;
    }

    /**
     * @return HttpKernel
     */
    public function getHttpKernel()
    {
        return $this->httpKernel;
    }

    /**
     * @return string
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * @return Request
     */
    public function getRequest()
    {
        return $this->request;
    }
}
