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