. */ namespace SP\Providers; use SP\Core\Application; use SP\Domain\Config\Ports\ConfigFileService; use SP\Domain\Core\Context\Context; use SP\Domain\Core\Events\EventDispatcherInterface; /** * Class Service * * @package SP\Providers */ abstract class Provider implements ProviderInterface { protected readonly ConfigFileService $config; protected readonly Context $context; protected readonly EventDispatcherInterface $eventDispatcher; protected bool $initialized = false; /** * Provider constructor. * * @param Application $application */ public function __construct(Application $application) { $this->config = $application->getConfig(); $this->context = $application->getContext(); $this->eventDispatcher = $application->getEventDispatcher(); } /** * @return bool */ public function isInitialized(): bool { return $this->initialized; } }