public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(
                'Configuration must be an array or a ConfigInterface object.'
            );
        }
        return $this;
    }
public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(
                'Configuration must be an array or a ConfigInterface object.'
            );
        }
        return $this;
    }
public function setConfig ( $ config ) { if ( is_array ( $ config ) ) { $ this -> config = $ this -> createConfig ( $ config ) ; } elseif ( $ config instanceof ConfigInterface ) { $ this -> config = $ config ; } else { throw new InvalidArgumentException ( 'Configuration must be an array or a ConfigInterface object.' ) ; } return $ this ; }
Set the object's configuration container.

@param  ConfigInterface|array $config The datas to set.
@throws InvalidArgumentException If the parameter is invalid.
@return ConfigurableInterface Chainable
Set the object s configuration container .