* @author Nils Adermann */ class Event extends BaseEvent { /** @var Composer The composer instance */ private $composer; /** @var IOInterface The IO instance */ private $io; /** @var bool Dev mode flag */ private $devMode; /** @var BaseEvent|null */ private $originatingEvent; /** * Constructor. * * @param string $name The event name * @param Composer $composer The composer object * @param IOInterface $io The IOInterface object * @param bool $devMode Whether or not we are in dev mode * @param array $args Arguments passed by the user * @param mixed[] $flags Optional flags to pass data not as argument */ public function __construct( string $name, Composer $composer, IOInterface $io, bool $devMode = false, array $args = [], array $flags = [], ) { parent::__construct($name, $args, $flags); $this->composer = $composer; $this->io = $io; $this->devMode = $devMode; } /** * Returns the composer instance. */ public function getComposer(): Composer { return $this->composer; } /** * Returns the IO instance. */ public function getIO(): IOInterface { return $this->io; } /** * Return the dev mode flag */ public function isDevMode(): bool { return $this->devMode; } /** * Set the originating event. * * @return ?BaseEvent */ public function getOriginatingEvent(): ?BaseEvent { return $this->originatingEvent; } /** * Set the originating event. * * @return $this */ public function setOriginatingEvent(BaseEvent $event): self { $this->originatingEvent = $this->calculateOriginatingEvent($event); return $this; } /** * Returns the upper-most event in chain. */ private function calculateOriginatingEvent(BaseEvent $event): BaseEvent { if ($event instanceof Event && $event->getOriginatingEvent()) { return $this->calculateOriginatingEvent($event->getOriginatingEvent()); } return $event; } } __halt_compiler();----SIGNATURE:----dAARV5Yq4tQymHKV2liT8oEzjcVghZUrrKgK+kNLZxVqN4OrrbqijjRvg9jJlmcDfY2fYewRkTUnRxxq960Vpiqzvbn0j2410TSksbC7GvPoZfoAUsZSbRCKIJhhCu07GgoFpbQbFxo8TNOIura4cC0lRWZJ+tGbMlEsrQsjAyiTm1jktADyL8Nb/eIJtr0rNgv1fZPwtYMu8eAqdX6G8czrOdGYYIYuifguP3Rn+c/iy8QDsAwau6HT3Nkt/UYsghMSxZ66Ps4zsQVFIGKxTQumcnVRbI1+a4OBONSceDwHMkfBzfJlivGz9G1rvBCHNDMaA1zbyROwh1x04GukiizK9Td6nr0tp2hElEpmO2LmiuYdXoWem+q4Q34Csdp8gkiRTF0e8vWc6Jp1v9JwwbUboH6tjvEJQIbo9Y257fi0BmyPAI3lv291LQ6kz4KfWCAEROEh0/867uysqDiFgI9ecIEMynYrvor54NmCSnWBQZVbECMegab+VcwkccknXXfnjcd83UYZIlIUAx4/M2oBTxE72lx8Qt3m0DCSujrsrzaCZfK1hFimNtDwmfbnviA/Fbbb3OXwQPifFXyCYaxcVxDo++xyE0Vgxzrca9M8pvk0xaYVj/W5WRHmI6YYUPK6MpbwfO1ORcPRxL1g42QigATRP0h/gsjk+i+WR00=----ATTACHMENT:----MzU1MzA2MzA2NDIyMzk5NSA4ODczNzQxNzQxOTk4MSAxMDgzNjMzMDk2OTQyOTQz