<?php
namespace Claromentis\Core\Config;

$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] ?: array()) + array("_bd71c3b5" . "c201fc11d" . "b82ed14ce" . "424de5" => base64_decode("aW5fY" . "XJyYX" . "k="));




class ConfigArray implements WritableConfig
{
    
    
    
    
    protected array $config;
    
    
    
    
    
    
    protected ?array $writableKeys;
    
    
    
    
    
    
    
    public function __construct(array $config = [], ?array $_e6592e635ebb74d430b5d3bac59df55b = null)
    {
        $this->config = $config;
        $this->writableKeys = $_e6592e635ebb74d430b5d3bac59df55b;
    }
    public function has(string $key) : bool
    {
        return isset($this->config[$key]);
    }
    public function get(string $key)
    {
        return $this->config[$key] ?? null;
    }
    public function getAll() : array
    {
        return $this->config;
    }
    public function set(string $key, $value) : void
    {
        if (!$this->canSet($key)) {
            return;
        }
        $this->config[$key] = $value;
    }
    public function setMany(array $values) : void
    {
        foreach ($values as $key => $value) {
            $this->set($key, $value);
        }
    }
    public function delete(string $key) : void
    {
        if ($this->canSet($key)) {
            unset($this->config[$key]);
        }
    }
    public function save() : void
    {
        
        
    }
    public function canSet(string $key) : bool
    {
        return $this->writableKeys === null || $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_bd71c3b5c201fc11db82ed14ce42" . "4de5"]($key, $this->getWritableKeys());
    }
    
    
    
    
    
    
    public function getWritableKeys() : ?array
    {
        return $this->writableKeys;
    }
    
    
    
    
    
    
    
    
    
    
    public function setWritableKeys(?array $_0a20daf6005c81366c9fc0853387f6ad)
    {
        $this->writableKeys = $_0a20daf6005c81366c9fc0853387f6ad;
    }
    public function offsetExists($_1f50e30be8c2fefa6881834e71d504a2) : bool
    {
        return $this->has($_1f50e30be8c2fefa6881834e71d504a2);
    }
    public function offsetGet($_1f50e30be8c2fefa6881834e71d504a2)
    {
        return $this->get($_1f50e30be8c2fefa6881834e71d504a2);
    }
    public function offsetSet($_1f50e30be8c2fefa6881834e71d504a2, $value) : void
    {
        $this->set($_1f50e30be8c2fefa6881834e71d504a2, $value);
    }
    public function offsetUnset($_1f50e30be8c2fefa6881834e71d504a2) : void
    {
        $this->delete($_1f50e30be8c2fefa6881834e71d504a2);
    }
}