src/Drivers/File.php
public function write(string $name, $value) : bool
    {
        $path = explode('.', $name);
        $key = $path[0];
        $file = $this->configFile($key);

        if (!isset($this->cache[$key])) {
            if (file_exists($file)) {
                $this->cache[$key] = new ConfigHelper($this->readConfig($file));
            } else {
                $this->cache[$key] = new ConfigHelper();
            }

        }

        $this->cache[$key]->set($path, $value);
        $this->writeConfig($file, $this->cache[$key]->getConfig());
        return true;
    }
public function write(string $name, $value) : bool
    {
        $path = explode('.', $name);
        $key = $path[0];
        $file = $this->configFile($key);

        if (!isset($this->cache[$key])) {
            if (file_exists($file)) {
                $this->cache[$key] = new ConfigHelper($this->readConfig($file));
            } else {
                $this->cache[$key] = new ConfigHelper();
            }

        }

        $this->cache[$key]->set($path, $value);
        $this->writeConfig($file, $this->cache[$key]->getConfig());
        return true;
    }
public function write ( string $ name , $ value ) : bool { $ path = explode ( '.' , $ name ) ; $ key = $ path [ 0 ] ; $ file = $ this -> configFile ( $ key ) ; if ( ! isset ( $ this -> cache [ $ key ] ) ) { if ( file_exists ( $ file ) ) { $ this -> cache [ $ key ] = new ConfigHelper ( $ this -> readConfig ( $ file ) ) ; } else { $ this -> cache [ $ key ] = new ConfigHelper ( ) ; } } $ this -> cache [ $ key ] -> set ( $ path , $ value ) ; $ this -> writeConfig ( $ file , $ this -> cache [ $ key ] -> getConfig ( ) ) ; return true ; }
{@inheritdoc}
{