src/Services/Config/ConfigData.php
public function setConfigByFile($name)
    {
        $file = "/{$name}.cfg.php";
        if ('production' !== FS2_ENV) {
            $file_env = "/{$name}-{FS2_ENV}.cfg.php";
            if (file_exists(FS2CONFIG . $file_env)) {
                $file = $file_env;
            }
        }

        $config = array();
        if (file_exists(FS2CONFIG . "/" . $file)) {
            include(FS2CONFIG . "/" . $file);
        }
        return $this->setConfigByArray($config);
    }
public function setConfigByFile($name)
    {
        $file = "/{$name}.cfg.php";
        if ('production' !== FS2_ENV) {
            $file_env = "/{$name}-{FS2_ENV}.cfg.php";
            if (file_exists(FS2CONFIG . $file_env)) {
                $file = $file_env;
            }
        }

        $config = array();
        if (file_exists(FS2CONFIG . "/" . $file)) {
            include(FS2CONFIG . "/" . $file);
        }
        return $this->setConfigByArray($config);
    }
public function setConfigByFile ( $ name ) { $ file = "/{$name}.cfg.php" ; if ( 'production' !== FS2_ENV ) { $ file_env = "/{$name}-{FS2_ENV}.cfg.php" ; if ( file_exists ( FS2CONFIG . $ file_env ) ) { $ file = $ file_env ; } } $ config = array ( ) ; if ( file_exists ( FS2CONFIG . "/" . $ file ) ) { include ( FS2CONFIG . "/" . $ file ) ; } return $ this -> setConfigByArray ( $ config ) ; }
set multiple config entries from a config file
does not change any database data
@param $name
@return ConfigData
set multiple config entries from a config file does not change any database data