1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Routing\Events;
12:
13: use Symfony\Component\EventDispatcher\Event;
14: use Symfony\Component\HttpFoundation\Request;
15:
16: use Autarky\Routing\Route;
17:
18: class AbstractRouteEvent extends Event
19: {
20: /**
21: * @var Request
22: */
23: protected $request;
24:
25: /**
26: * @var Route
27: */
28: protected $route;
29:
30: /**
31: * @param Request $request
32: * @param Route $route
33: */
34: public function __construct(Request $request, Route $route)
35: {
36: $this->request = $request;
37: $this->route = $route;
38: }
39:
40: /**
41: * Get the request instance.
42: *
43: * @return Request
44: */
45: public function getRequest()
46: {
47: return $this->request;
48: }
49:
50: /**
51: * Get the route instance.
52: *
53: * @return Route
54: */
55: public function getRoute()
56: {
57: return $this->route;
58: }
59: }
60: