/** * Initialise data for configuration * @return void */ protected function initData() { $data = $this->cache->load($this->cacheId); if (false === $data) { $singleQuery = $this->config->getConnectionName('checkout_setup') == 'default' ? true : false; $data['checkout'] = $singleQuery; $this->cache->save(serialize($data), $this->cacheId, $this->cacheTags); } else { $data = unserialize($data); } $this->merge($data); }
/** * Retrieve connection to resource specified by $resourceName * * @param string $resourceName * @return \Magento\Framework\DB\Adapter\AdapterInterface * @throws \DomainException * @codeCoverageIgnore */ public function getConnection($resourceName = self::DEFAULT_CONNECTION) { $connectionName = $this->config->getConnectionName($resourceName); return $this->getConnectionByName($connectionName); }