library/Phalex/Config/Cache/FileTrait.php
public function setConfig(array $config, $file = null)
    {
        $file = !empty($file) ? $file : $this->fileCache;
        if (file_exists($file)) {
            unlink($file);
        }
        (new PhpArray())
                ->setUseBracketArraySyntax(true)
                ->toFile($file, $config);
    }
public function setConfig(array $config, $file = null)
    {
        $file = !empty($file) ? $file : $this->fileCache;
        if (file_exists($file)) {
            unlink($file);
        }
        (new PhpArray())
                ->setUseBracketArraySyntax(true)
                ->toFile($file, $config);
    }
public function setConfig ( array $ config , $ file = null ) { $ file = ! empty ( $ file ) ? $ file : $ this -> fileCache ; if ( file_exists ( $ file ) ) { unlink ( $ file ) ; } ( new PhpArray ( ) ) -> setUseBracketArraySyntax ( true ) -> toFile ( $ file , $ config ) ; }
Set config to file
@param array $config
@param string $file
Set config to file