configCache = $configCache; } /** * {@inheritDoc} */ public function getCache(): Cache { return $this->configCache; } /** {@inheritDoc} */ public function beginTransaction(): ISetConfigValuesTransactionally { throw new ConfigPersistenceException('beginTransaction not allowed.'); } /** {@inheritDoc} */ public function reload() { throw new ConfigPersistenceException('reload not allowed.'); } /** {@inheritDoc} */ public function get(string $cat, string $key = null, $default_value = null) { return $this->configCache->get($cat, $key) ?? $default_value; } /** {@inheritDoc} */ public function isWritable(string $cat, string $key): bool { return $this->configCache->getSource($cat, $key) < Cache::SOURCE_ENV; } /** {@inheritDoc} */ public function set(string $cat, string $key, $value): bool { throw new ConfigPersistenceException('set not allowed.'); } /** {@inheritDoc} */ public function delete(string $cat, string $key): bool { throw new ConfigPersistenceException('Save not allowed'); } }