public function setConfig($config)
    {
        if (is_string($config)) {
            // Treat the parameter as a filepath
            $this->config = $this->createConfig($config);
        } elseif (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(sprintf(
                'Configset must be an associative array, a file path, or an instance of %s',
                ConfigInterface::class
            ));
        }

        return $this;
    }
public function setConfig($config)
    {
        if (is_string($config)) {
            // Treat the parameter as a filepath
            $this->config = $this->createConfig($config);
        } elseif (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(sprintf(
                'Configset must be an associative array, a file path, or an instance of %s',
                ConfigInterface::class
            ));
        }

        return $this;
    }
public function setConfig ( $ config ) { if ( is_string ( $ config ) ) { // Treat the parameter as a filepath $ this -> config = $ this -> createConfig ( $ config ) ; } elseif ( is_array ( $ config ) ) { $ this -> config = $ this -> createConfig ( $ config ) ; } elseif ( $ config instanceof ConfigInterface ) { $ this -> config = $ config ; } else { throw new InvalidArgumentException ( sprintf ( 'Configset must be an associative array, a file path, or an instance of %s' , ConfigInterface :: class ) ) ; } return $ this ; }
Sets the object's configuration container.

@param  mixed $config The Config object, datamap, or filepath.
@throws InvalidArgumentException If the parameter is invalid.
@return self Chainable
Sets the object s configuration container .