src/RocknRoot/StrayFw/Config.php
public static function set(string $fileName, array $content)
    {
        try {
            $json = Yaml::dump($content, 2);
            if (file_put_contents($fileName, $json) === false) {
                throw new FileNotWritable('can\'t write to "' . $fileName . '"');
            }
        } catch (DumpException $e) {
            throw new BadUse('Config::set() content parameter can\'t be dump to YAML');
        }
        self::$files[$fileName] = $content;
    }
public static function set(string $fileName, array $content)
    {
        try {
            $json = Yaml::dump($content, 2);
            if (file_put_contents($fileName, $json) === false) {
                throw new FileNotWritable('can\'t write to "' . $fileName . '"');
            }
        } catch (DumpException $e) {
            throw new BadUse('Config::set() content parameter can\'t be dump to YAML');
        }
        self::$files[$fileName] = $content;
    }
public static function set ( string $ fileName , array $ content ) { try { $ json = Yaml :: dump ( $ content , 2 ) ; if ( file_put_contents ( $ fileName , $ json ) === false ) { throw new FileNotWritable ( 'can\'t write to "' . $ fileName . '"' ) ; } } catch ( DumpException $ e ) { throw new BadUse ( 'Config::set() content parameter can\'t be dump to YAML' ) ; } self :: $ files [ $ fileName ] = $ content ; }
Write a file content. Save it internally.

@static
@throws FileNotWritable if file can't be written
@param  string          $fileName file name
@param  array           $content  file content
Write a file content . Save it internally .