public function updateConfig(string $configFile, array $newData, ?bool $mergeDeep = false): bool
    {
        $this->load($configFile);
        if (!isset($this->data[$configFile])) {
            return false;
        }

        $oldData = $this->data[$configFile];
        $saveData = ($mergeDeep ? Arr::mergeRecursive($oldData, $newData) : Arr::merge($oldData, $newData));
        return $this->writeConfig($configFile, $saveData);
    }
public function updateConfig(string $configFile, array $newData, ?bool $mergeDeep = false): bool
    {
        $this->load($configFile);
        if (!isset($this->data[$configFile])) {
            return false;
        }

        $oldData = $this->data[$configFile];
        $saveData = ($mergeDeep ? Arr::mergeRecursive($oldData, $newData) : Arr::merge($oldData, $newData));
        return $this->writeConfig($configFile, $saveData);
    }
public function updateConfig ( string $ configFile , array $ newData , ? bool $ mergeDeep = false ) : bool { $ this -> load ( $ configFile ) ; if ( ! isset ( $ this -> data [ $ configFile ] ) ) { return false ; } $ oldData = $ this -> data [ $ configFile ] ; $ saveData = ( $ mergeDeep ? Arr :: mergeRecursive ( $ oldData , $ newData ) : Arr :: merge ( $ oldData , $ newData ) ) ; return $ this -> writeConfig ( $ configFile , $ saveData ) ; }
Update configuration data based on key-value array of new data. Do not pass multi-level array on new position without existing keys
@param string $configFile
@param array $newData
@param bool $mergeDeep
@return bool
Update configuration data based on key - value array of new data . Do not pass multi - level array on new position without existing keys