Applies mass configuration to default request

@param array $config
@return $this
182483
public function config(array $config)
    {
        $this->validateConfig($config);


        if (array_key_exists('location', $config)) {
            $this->defaults->setLocation($config['location']);
        }

        if (array_key_exists('port', $config)) {
            $this->defaults->setPort($config['port']);
        }

        if (array_key_exists('headers', $config)) {
            $this->defaults->setHeaders($config['headers']);
        }

        if (array_key_exists('credentials', $config)) {
            $this->defaults->setCredentials(
                array_get($config['credentials'], 'name'),
                array_get($config['credentials'], 'password'),
                array_get($config['credentials'], 'domain')
            );
        }

        if (array_key_exists('method', $config)) {
            $this->defaults->setMethod($config['method']);
        }

        if (array_key_exists('parameters', $config)) {
            $this->defaults->setParameters($config['parameters']);
        }

        if (array_key_exists('body', $config)) {
            $this->defaults->setBody($config['body']);
        }

        if (array_key_exists('options', $config)) {
            $this->defaults->setOptions($config['options']);
        }

        return $this;
    }
671390
public static function createFromConfig(array $config)
    {
        $manager = static::createEmptyFromConfig($config);

        $manager->addCollection(new CssCollection)
                ->addCollection(new JavascriptCollection);

        return $manager;
       
    }
5271
function configure($config = []) {
    $this->config = array_replace_recursive($this->config, $this->modes[@$config['mode'] ?: $this->config['mode']]);
    
    $this->config = array_replace_recursive($this->config, $config);
    
    return $this;
  }
878392
protected function initializeConfig(array $config = null)
    {
        $default = $this->defaultConfigurations();

        $this->config = $config ? array_replace_recursive($default, $config) : $default;
    }
945210
public function setConfig(array $config)
    {
        foreach ($config as $key => $value) {
            $this->_config[$key] = $value;
        }

        return $this;
    }
628638
public function set_config(array $config)
    {
        if (isset($config['convert_integers'])) {
            $this->config['convert_integers'] = (bool)$config['convert_integers'];
        }

        if (isset($config['typecast_objects'])) {
            $this->config['typecast_objects'] = (bool)$config['typecast_objects'];
        }

        return $this;
    }
149428
protected function setBasicOptions(array $config)
    {
        if (!isset($config['timeout'])) {
            $config['timeout'] = static::DEFAULT_REQUEST_TIMEOUT;
        }

        if (isset($config['base_uri']) && strpos($config['base_uri'], 'http') === false) {
            $config['base_uri'] = 'https://' . $config['base_uri'];
            return $config;
        }
        return $config;
    }
460441
protected function initRequest( array $config )
    {
        if ( isset( $config[ 'request' ] ) )
        {
            if ( isset( $config[ 'request' ][ 'class' ] ) )
            {
                $this->bindShared( 'RawPHP\RawRequest\Contract\IRequest', function () use ( $config )
                {
                    $class = $config[ 'request' ][ 'class' ];

                    return new $class( $config[ 'request' ] );
                }
                );
            }
            else
            {
                $this->bindShared( 'RawPHP\RawRequest\Contract\IRequest', function () use ( $config )
                {
                    return new Request( $config[ 'request' ] );
                }
                );
            }
        }
        else
        {
            $this->bindShared( 'RawPHP\RawRequest\Contract\IRequest', function ()
            {
                $request = new Request();
                $request->init();

                return $request;
            }
            );
        }

        $this->alias( 'RawPHP\RawRequest\Contract\IRequest', 'request' );
    }
233617
public function setConfigs($config)
    {
        if (is_array($config) === false && $config instanceof \Traversable === false) {
            throw new \InvalidArgumentException(
                'Expected an array or Traversable; received: ' .
                (is_object($config) === true ? get_class($config) : gettype($config))
            );
        }
        foreach ($config as $name => $value) {
            $this->setConfig($name, $value);
        }
        return $this;
    }
830595
public function setProfile($config)
    {
        if (!is_array($config)) {
            $config = (string)$config;
        }
        $this->_applyConfig($config);

        return $this;
    }
893429
public function setAppRoot(array $config)
    {
        $this->app_name   = $config['app_name'];
        $this->app_dir    = rtrim($config['app_dir'], '/');
        $this->debug      = $config['debug'];
        $this->config_dir = $config['config_dir'];
        $this->view_dir   = $config['view_dir'];
        $this->vars_dir   = $config['vars_dir'];
        return $this;
    }
1143557
public static function createEmptyFromConfig(array $config)
    {
        $manager = new self();

        if (isset($config['base_uri'])) {

            $manager->setBaseUri($config['base_uri']);
        }

        if (isset($config['path'])) {

            $manager->setBasePath($config['path']);
        }

        if (isset($config['path_aliases']) && is_array($config['path_aliases'])) {

            foreach ($config['path_aliases'] as $alias => $path) {

                $manager->addPathAlias($alias, $path);
            }   
        }

        if (isset($config['compiled'])) {

            $manager->setCompileDirectory($config['compiled']);
        }

        if (isset($config['version'])) {

            $manager->setVersion($config['version']);
        }

        return $manager;
    }
905735
public function setConfig(array $config)
    {
        foreach ($config as $name => $value) {
            $setter = 'set' . ucfirst($name);

            call_user_func_array(array($this, $setter), array($value));
        }
    }
970711
private function setConfig(array $config = [])
    {
        // Set Api Credentials
        if (function_exists('config')) {
            $this->setApiCredentials(
                config('paypal')
            );
        } elseif (!empty($config)) {
            $this->setApiCredentials($config);
        }

        $this->setRequestData();
    }
1057711
public function setConfig(array $config)
    {
        foreach ($this->configurable as $setting) {
            if ( ! isset($config[$setting])) {
                continue;
            }

            $method = 'set' . ucfirst($setting);

            if (method_exists($this, $method)) {
                $this->$method($config[$setting]);
            }
        }

        return $this;
    }
975706
public function setCollectionConfig($config)
    {
        if (empty($config) || !is_array($config)) {
            $config = [];
        }

        $this->collectionConfig = array_replace_recursive(
            $this->defaultCollectionConfig(),
            $this->parseCollectionConfig($config)
        );

        return $this;
    }
557560
public function add(array $config) : self
    {
        $this->config = array_replace_recursive($this->config, $config);

        return $this;
    }