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\Events;
12:
13: use Symfony\Component\EventDispatcher\EventDispatcherInterface;
14:
15: /**
16: * @see EventDispatcherAwareInterface
17: */
18: trait EventDispatcherAwareTrait
19: {
20: /**
21: * @var EventDispatcherInterface
22: */
23: protected $eventDispatcher;
24:
25: /**
26: * Set the event dispatcher instance.
27: *
28: * @param EventDispatcherInterface $eventDispatcher
29: */
30: public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
31: {
32: $this->eventDispatcher = $eventDispatcher;
33: }
34: }
35: