1: <?php
2: namespace Peridot\WebDriverManager\Event;
3:
4: use Evenement\EventEmitterTrait as BaseEmitterTrait;
5: use Evenement\EventEmitterInterface as BaseEmitterInterface;
6:
7: /**
8: * EventEmitterTrait is used to implement EventEmitterInterface->inherit()
9: *
10: * @package Peridot\WebDriverManager\Event
11: */
12: trait EventEmitterTrait
13: {
14: use BaseEmitterTrait;
15:
16: public function inherit(array $events, BaseEmitterInterface $emitter)
17: {
18: foreach ($events as $event) {
19: $emitter->on($event, function () use ($event) {
20: $this->emit($event, func_get_args());
21: });
22: }
23: }
24: }
25: