. */ namespace SP\Core; use SP\Domain\Config\Ports\ConfigInterface; 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 ConfigInterface $config * @param \SP\Domain\Core\Events\EventDispatcherInterface $eventDispatcher * @param SessionContextInterface|\SP\Domain\Core\Context\ContextInterface $context */ public function __construct( private readonly ConfigInterface $config, private readonly EventDispatcherInterface $eventDispatcher, private readonly SessionContextInterface|ContextInterface $context ) { } public function getConfig(): ConfigInterface { return $this->config; } public function getEventDispatcher(): EventDispatcherInterface { return $this->eventDispatcher; } public function getContext(): ContextInterface|SessionContextInterface { return $this->context; } }