src/Expose/Manager.php
public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = new Config($config);
        } else {
            // see if it's a file path
            if (is_file($config)) {
                $cfg = parse_ini_file($config, true);
                $this->config = new Config($cfg);
            } else {
                throw new \InvalidArgumentException(
                    'Could not load configuration file '.$config
                );
            }
        }
    }
public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = new Config($config);
        } else {
            // see if it's a file path
            if (is_file($config)) {
                $cfg = parse_ini_file($config, true);
                $this->config = new Config($cfg);
            } else {
                throw new \InvalidArgumentException(
                    'Could not load configuration file '.$config
                );
            }
        }
    }
public function setConfig ( $ config ) { if ( is_array ( $ config ) ) { $ this -> config = new Config ( $ config ) ; } else { // see if it's a file path if ( is_file ( $ config ) ) { $ cfg = parse_ini_file ( $ config , true ) ; $ this -> config = new Config ( $ cfg ) ; } else { throw new \ InvalidArgumentException ( 'Could not load configuration file ' . $ config ) ; } } }
Set the configuration for the object

@param array|string $config Either an array of config settings
or the path to the config file
@throws \InvalidArgumentException If config file doesn't exist
Set the configuration for the object