public function writeConfig(string $configFile, array $data): bool
    {
        $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php';
        if (!File::exist($path) || !File::writable($path)) {
            return false;
        }

        $saveData = '<?php return ' . Arr::exportVar($data) . ';';
        File::write($path, $saveData);
        // overload config values if changed
        $this->load($configFile, true);
        return true;
    }
public function writeConfig(string $configFile, array $data): bool
    {
        $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php';
        if (!File::exist($path) || !File::writable($path)) {
            return false;
        }

        $saveData = '<?php return ' . Arr::exportVar($data) . ';';
        File::write($path, $saveData);
        // overload config values if changed
        $this->load($configFile, true);
        return true;
    }
public function writeConfig ( string $ configFile , array $ data ) : bool { $ path = '/Private/Config/' . ucfirst ( Str :: lowerCase ( $ configFile ) ) . '.php' ; if ( ! File :: exist ( $ path ) || ! File :: writable ( $ path ) ) { return false ; } $ saveData = '<?php return ' . Arr :: exportVar ( $ data ) . ';' ; File :: write ( $ path , $ saveData ) ; // overload config values if changed $ this -> load ( $ configFile , true ) ; return true ; }
Write configurations data from array to cfg file
@param string $configFile
@param array $data
@return bool
Write configurations data from array to cfg file