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