* @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:----PUP7bQqJg6QP0YNJVqwTBZTfqboCVaNbXuCguatxyZ6+5kiqWhfWxEbMQzkZ5nWsLwzF9DCrfO4Sa1nnraXmvvMCeKRuw4IZgX/M1nq0M6Llgi9iashod9t2+GBzSJnjtYtLyK+bZSYozZunI0lspbjgFT2UwuYlDjJciWGIWw2R9c8c/iyGp/lnM9vB0xyxc/Cu98LbneQM3cAB4nx1LimjKnZ9Cak8svvqDBAoAHrAFgRy7WlNZc3cyYqcjeU9yojourtO0WdJ/xSKJBlM57uMCQPvreAA8BU6hJfqdMHHUByrzD5lZQqQHWriVSjh9RlYzVTqz56nGRRFwqKFHGe6DdRh5A/Tug4xJlW7oqne2K5LCINRnwxrRIv/dd7uiA6kYGvyAIHnWKjZnyo/kVnXGOnYgbGb4Fu3e0OuqgET4xBYwnWJBjmsxUGCaeevFXhqnPesxDkLKR9ShsGZW3TyseXdpRCGNL0ZeLaGJ1EtX1ONv1gtThf3OgpgS1hHrWLmgR0vh2KSdCjJlnI9wKuTWm06iyu85JdBV1aW5H+AssxIlvHNR7XMis18Gc8uhYmZ9f6XTKo+eJt3vzuAmui8GHhn3kvQf+6CxLe7r710yTtwfFgIEIlK2LJYg0wyZmvbv60T27eb8gz6NSezqANWI/r2ZhLKK8ckWsVvbQg=----ATTACHMENT:----ODY3NzkyNjAxOTk2NzE1NSAzNDYzODA5NDkwMzMwNDQ2IDcxMDMxNzY5MTY5MjQxOTU=