public function setConfig($config)
    {
        if(is_string($config)){
            if (file_exists($config)) {
                $config = \Zend\Config\Factory::fromFile($config);
            } else {
                throw new \InvalidArgumentException(
                    sprintf('Unable to read configurations from file %s',$config));
            }
        }
    
        if(!is_array($config) && !($config instanceof \Traversable)){
            throw new \InvalidArgumentException(
                    sprintf('Config must be an array, Traversable object or filename; %s received',
                            is_object($config) ? get_class($config) : gettype($config)));
        }
    
        $this->setOptions($config);
    }
public function setConfig($config)
    {
        if(is_string($config)){
            if (file_exists($config)) {
                $config = \Zend\Config\Factory::fromFile($config);
            } else {
                throw new \InvalidArgumentException(
                    sprintf('Unable to read configurations from file %s',$config));
            }
        }
    
        if(!is_array($config) && !($config instanceof \Traversable)){
            throw new \InvalidArgumentException(
                    sprintf('Config must be an array, Traversable object or filename; %s received',
                            is_object($config) ? get_class($config) : gettype($config)));
        }
    
        $this->setOptions($config);
    }
public function setConfig ( $ config ) { if ( is_string ( $ config ) ) { if ( file_exists ( $ config ) ) { $ config = \ Zend \ Config \ Factory :: fromFile ( $ config ) ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Unable to read configurations from file %s' , $ config ) ) ; } } if ( ! is_array ( $ config ) && ! ( $ config instanceof \ Traversable ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Config must be an array, Traversable object or filename; %s received' , is_object ( $ config ) ? get_class ( $ config ) : gettype ( $ config ) ) ) ; } $ this -> setOptions ( $ config ) ; }
Set options as config file, array or traversable
object

@param string|array|\Traversable $config

@ValuSo\Exclude
Set options as config file array or traversable object