public function setConfig($config)
    {
        $configObject = $this->getConfig();

        if (is_object($config)) {
            $config = get_object_vars($config);
        }

        foreach ((array)$config as $key => $value) {
            $configObject->$key = $value;
        }

        return $this;
    }
public function setConfig($config)
    {
        $configObject = $this->getConfig();

        if (is_object($config)) {
            $config = get_object_vars($config);
        }

        foreach ((array)$config as $key => $value) {
            $configObject->$key = $value;
        }

        return $this;
    }
public function setConfig ( $ config ) { $ configObject = $ this -> getConfig ( ) ; if ( is_object ( $ config ) ) { $ config = get_object_vars ( $ config ) ; } foreach ( ( array ) $ config as $ key => $ value ) { $ configObject -> $ key = $ value ; } return $ this ; }
Sets new configuration for the loader

@param ConfigInterface|array $config
@return $this
Sets new configuration for the loader