1: <?php
2: /**
3: * PHP version 5
4: * @package generalDriver
5: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
6: * @author Stefan Heimes <stefan_heimes@hotmail.com>
7: * @author Tristan Lins <tristan.lins@bit3.de>
8: * @copyright The MetaModels team.
9: * @license LGPL.
10: * @filesource
11: */
12:
13: namespace DcGeneral\Event;
14:
15: use DcGeneral\ContainerAwareInterface;
16: use DcGeneral\DataDefinition\ContainerInterface;
17: use Symfony\Component\EventDispatcher\Event;
18:
19: /**
20: * Abstract base class for container aware events.
21: *
22: * This class solely implements the ContainerAwareInterface.
23: *
24: * @package DcGeneral\Event
25: */
26: abstract class AbstractContainerAwareEvent
27: extends Event
28: implements ContainerAwareInterface
29: {
30: /**
31: * The container in use.
32: *
33: * @var ContainerInterface
34: */
35: protected $container;
36:
37: /**
38: * Create a new container aware event.
39: *
40: * @param ContainerInterface $container The container in use.
41: */
42: public function __construct(ContainerInterface $container)
43: {
44: $this->container = $container;
45: }
46:
47: /**
48: * {@inheritdoc}
49: */
50: public function getContainer()
51: {
52: return $this->container;
53: }
54: }
55: