. */ namespace SP\Core; use SP\Core\Context\ContextInterface; use SP\Core\Events\EventDispatcher; use SP\Domain\Config\ConfigInterface; /** * The Application helper class. It holds all the needed dependencies for the application */ final class Application { private ConfigInterface $config; private EventDispatcher $eventDispatcher; private ContextInterface $context; /** * Module constructor. * * @param ConfigInterface $config * @param EventDispatcher $eventDispatcher * @param ContextInterface $context */ public function __construct( ConfigInterface $config, EventDispatcher $eventDispatcher, ContextInterface $context ) { $this->config = $config; $this->eventDispatcher = $eventDispatcher; $this->context = $context; } public function getConfig(): ConfigInterface { return $this->config; } public function getEventDispatcher(): EventDispatcher { return $this->eventDispatcher; } public function getContext(): ContextInterface { return $this->context; } }