. */ namespace SP\Modules\Web\Controllers\Helpers; use SP\Core\Application; use SP\Domain\Config\Ports\ConfigDataInterface; use SP\Domain\Config\Ports\ConfigFileService; use SP\Domain\Core\Context\Context; use SP\Domain\Core\Events\EventDispatcherInterface; use SP\Domain\Http\Ports\RequestService; use SP\Mvc\View\TemplateInterface; /** * Class HelperBase * * @package SP\Modules\Web\Controllers\Helpers */ abstract class HelperBase { protected readonly TemplateInterface $view; protected readonly ConfigDataInterface $configData; protected readonly Context $context; protected readonly EventDispatcherInterface $eventDispatcher; protected readonly ConfigFileService $config; public function __construct( Application $application, TemplateInterface $template, protected readonly RequestService $request ) { $this->config = $application->getConfig(); $this->context = $application->getContext(); $this->eventDispatcher = $application->getEventDispatcher(); $this->configData = $this->config->getConfigData(); $this->view = $template; } }