reinitableConfig = $reinitableConfig; $this->config = $config; $this->configWriter = $configWriter; } /** * Get Magento BI token value. * * @return string|null */ public function getToken() { return $this->config->getValue($this->tokenPath); } /** * Stores Magento BI token value. * * @param string $value * * @return bool */ public function storeToken($value) { $this->configWriter->save($this->tokenPath, $value); $this->reinitableConfig->reinit(); return true; } /** * Check Magento BI token value exist. * * @return bool */ public function isTokenExist() { return (bool)$this->getToken(); } }