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