* @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:----nDlhpdHcEWOmZQv07yT82xwWD0UYpyTwIfpHAPgDm+Xs1TVjsoZsEBKSDrCjdLSHZgot7N/iXHXRn4O0JDqSXLhHNu4YOYP8DOPX1GLQskVOgLareGrOxIg2lhUJjLKPq6RqVL2LlYlhhbj+IHC9w+Bo2cXlzprYpdXbScuGNTKph31nPiJ/2CbkcaxRFTJJ54suWoIuJSR4UtXuM8NH9x/savw95C7FOHPYw7s5grWI+J4RNXwZvAGays6RlGKm257XBrXvZd4boq0AWPFkps9+Y+7EkiQmyGWml5d8Q4khSpc1hZior1vAnAFIYI1jeExKwBE9k/hl3FF92A1cj5v3G+OVjGU49FEGRa2mOJmXcygPuFCS3XkSrzLKd59kgf6wX7FiZJuqZ1vVWmVTPu6QUfxLNvjrFJxp7zToBxcgKOkdzupqGOmrmP944NwCQ4QJXAPLdcyvQe1Np9KG3qSptsUB7CZDfwp0ibvK5I97Est6HKvwT0snBcsVaUulevmU2Jjc8FogWRzrjpmv+bN6t1n6DR20TCW9BycTmY84BHvzc/0Uf3udfl24IkONJGprKjDPGyedSMnELSMq6paCPcx7hae/m5tyWxGopp4E9KwOjbr4W+WGV1IKrs7wl4ccEQa+NP0oahR2jKL7jxeh3DuekA/iVmFKKGwPpCY=----ATTACHMENT:----NTAyNTM1MjE4MTIxNTQ3IDg0NzYxMjA1OTIwMjY4OTAgNDI5NzA3NTA1ODAyMTQzMg==