Set config to file
@param array $config
@param string $file
434243
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);
    }
2144
public static function fromConfigFile($file)
	{
		if(!is_file($file))
		{
			throw new \RuntimeException(sprintf('Config file "%s" does not exist', $file));
		}
		
		$config = new Configuration(static::processConfigFileData(require $file));
		
		return new ConnectionManager($config->getConfig('ConnectionManager'));
	}
858007
public function setConfig($configOrKey, $config = null) {
        if ($config !== null) {
            $this->config[$configOrKey] = $config;
        }
        else {
            $this->config = ($configOrKey !== null ? $configOrKey : array());
        }
    }
1024284
public function initialize(array $config)
    {
        Type::map('proffer.file', '\Proffer\Database\Type\FileType');
        $schema = $this->_table->getSchema();
        foreach (array_keys($this->getConfig()) as $field) {
            $schema->setColumnType($field, 'proffer.file');
        }
        $this->_table->setSchema($schema);
    }
1142485
public function setConfig(array $config)
    {
        if (!isset($config['thumbnailer'])) {
            $this->_thumbnailer = new Thumbnailer();
        } elseif (class_exists($config['thumbnailer'])) {
            $this->_thumbnailer = new $config['thumbnailer'];
        } else {
            throw new ConfigurationException('Class ' . $config['thumbnailer'] . ' does not exist.');
        }

        if (!($this->_thumbnailer instanceof ThumbnailerInterface)) {
            throw new ConfigurationException('Class ' . get_class($this->_thumbnailer) . ' must implement the interface \ysaroka\autothumb\ThumbnailerInterface.');
        }

        if (!isset($config['document_root'])) {
            throw new ConfigurationException('"document_root" key is required.');
        }

        if (!is_dir(realpath($config['document_root']))) {
            throw new ConfigurationException('"document_root": directory "' . $config['document_root'] . '" does not exist.');
        }

        if (!isset($config['types']) || count($config['types']) == 0) {
            throw new ConfigurationException('"types" key is required and should not be empty.');
        }

        foreach ($config['types'] as $type => $params) {
            if (!preg_match('#^[\w\d]+$#', $type)) {
                throw new ConfigurationException('"type": type name "' . $type . '" must contain only words and numbers.');
            }

            if (!isset($params['width'])) {
                $config['types'][$type]['width'] = 100;
            }

            if (!isset($params['height'])) {
                $config['types'][$type]['height'] = 100;
            }

            if (!isset($params['crop'])) {
                $config['types'][$type]['crop'] = true;
            }

            if (!isset($params['stretch'])) {
                $config['types'][$type]['stretch'] = false;
            }

            if (!isset($params['watermark'])) {
                $config['types'][$type]['watermark'] = false;
            } elseif (file_exists($params['watermark']) && !is_dir($params['watermark'])) {
                $config['types'][$type]['watermark'] = realpath($params['watermark']);
                if (isset($params['watermark_pos']) && defined('\ysaroka\autothumb\ThumbnailerInterface::POS_' . strtoupper($params['watermark_pos']))) {
                    $config['types'][$type]['watermark_pos'] = constant('\ysaroka\autothumb\ThumbnailerInterface::POS_' . strtoupper($params['watermark_pos']));
                } else {
                    $config['types'][$type]['watermark_pos'] = ThumbnailerInterface::POS_BOTTOM_RIGHT;
                }
            } else {
                throw new ConfigurationException('Image file "watermark": "' . $params['watermark'] . '" for type "' . $type . '" does not exist.');
            }
        }

        if (isset($config['allowed_extensions']) && is_array($config['allowed_extensions']) && count($config['allowed_extensions']) > 0) {
            $this->_allowedExtensions = $config['allowed_extensions'];
        }

        $this->_documentRoot = realpath($config['document_root']);
        $this->_types = $config['types'];

        return $this;
    }
599336
public static function config($config, $file = false) {
        $app = self::$app;
        if (isset ($app->configs [ $config ]) && !$file) {
            $confObj = $app->configs [ $config ];
        } else {
            $confObj = $file ? ConfigurationLoader::loadFromFile($config) : $app->configLoader->loadConfig($config);
            if (!$confObj) {
                $confObj = new Configuration ($config);
            }
            $app->configs [ $config ] = $confObj;
        }

        return $confObj;
    }
141383
public function addConfigFile($file, $alias = null) {

        $filePath = $this->findConfigFile($file);
        if (!is_string($alias)) {
            $this->configFiles[] = $filePath;
        } else {
            $this->configFiles[$alias] = $filePath;
        }
    }
888029
public function open($file, $config = array())
    {
        $fs = new Filesystem();
        $config['TempDir'] = $fs->getAbsolutePath();
        $this->reader = new \SpreadsheetReader_XLSX($file, $config);
    }
258904
public  function loadConfig($file){
		$config = include $file;
		$this->path = $config['path'];
		$this->compiled = $config['compiled'];
		$this->forceCompile = $config['forceCompile'];
		$this->skipCommentTags = $config['skipCommentTags'];
		$this->source_filename_extension = $config['source_filename_extension'];
		$this->dest_filename_extension = $config['dest_filename_extension'];
		if( !is_dir( $this->path )){
			mkdir( $this->path ,0777,true );
		}
		if( !is_dir( $this->compiled )){
			mkdir( $this->compiled ,0777,true );
		}
	}
1071794
public static function setConfig(Config $config): void
    {
        if ($config->name() == 'application') {
            throw new ConfigException('Can\'t set config under \'application\' name; name \'application\' is not permitted because it shouldn\'t be possible to change those settings in runtime');
        }

        static::$configs[$config->name()] = $config;
    }
846227
public function setConfig(array $configs)
	{
		foreach($configs as $config_key => $config_value)
		{
			if( property_exists(get_class($this), $config_key) )
			{
				$this->$config_key = $config_value;
			}
			else
			{
				throw new \InvalidArgumentException;
			}
		}
	}
726918
public function setConfig($config, $value = '')
    {
        if (is_array($config)) {
            $this->config = array_merge($this->config, $config);
        } else {
            $this->config[$config] = $value;
        }
    }
794634
public static function setConfig($config = [])
    {
        if (!is_array($config)) {
            return false;
        }
        self::$config = array_merge(self::$config, $config);
        return true;
    }
321205
function set_file_contents($config_file, $contents)
	{
		$this->_config_data[$config_file] = $this->parse_contents($contents);
		return true;
	}
1114221
private static function includeConfigFile(array &$config, $config_file, File $base_dir, ConfigReader $reader)
    {
        // try relative path
        $file = new File($config_file, $base_dir);
        
        if ( $file->exists() ){
            $included = self::loadConfigFileByFormat( $file, $reader );
            $config = array_merge_recursive($config, $included);
            return;
        }
        
        // try full path
        $file = new File($config_file);
        
        if ( $file->exists() ){
            $included = self::loadConfigFileByFormat( $file, $reader );
            $config = array_merge_recursive($config, $included);
            return;
        }
        
        throw new IncludeConfigFileNotFoundException($config_file);
    }
687308
public function saveConfiguration($filename, Config $config) {
        $this->workingPath = $this->parseFilepath($filename);

        $cacheManager = new CacheManager();
        $cacheManager->saveToCache('/' . $filename, $config->toDetailsArray());
    }
818024
public static function writeToDisk(Config $config) : void
    {
        $filePath = $config->getPath();
        $file     = new Json($filePath);
        $file->write($config->getJsonData());
    }