@param array $config

@return CouchbaseQueue|\Illuminate\Contracts\Queue\Queue
10065
public function connect(array $config)
    {
        /** @var CouchbaseConnection $connection */
        $connection = $this->connectionResolver->connection($config['driver']);

        return new CouchbaseQueue(
            $connection,
            $config['bucket'],
            $config['queue'],
            Arr::get($config, 'retry_after', 60)
        );
    }
581187
public function connect(array $config)
    {
        $pheanstalk = new Pheanstalk($config['host'], array_get($config, 'port', PheanstalkInterface::DEFAULT_PORT));

        return new BeanstalkdQueue(
            $pheanstalk, $config['queue'], array_get($config, 'ttr', Pheanstalk::DEFAULT_TTR)
        );
    }
1050401
public static function unserialize(array $config)
    {
        $configuration = new static;

        if (false !== ($clientConfiguration = unserialize($config['watched_files']))) {
            $configuration->set($clientConfiguration);
        }

        return $configuration;
    }
257880
public function fromConfig(array $config)
    {
        if ($this->env === 'dev' && php_sapi_name() !== 'cli') {
            //for performance reason only in dev mode: https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/_configuration.html#enabling_logger
            $config['Tracer'] = $this->logger;
        }
        $config['connectionPool'] = SniffingConnectionPool::class;

        return ClientBuilder::fromConfig($config);
    }
117184
public function make(array $config): Facebook
    {
        $config = $this->getConfig($config);

        return $this->getClient($config);
    }
680510
protected function createSingleConnection(array $config)
    {
        $pdo = $this->createPdoResolver($config);

        return $this->createConnection(
            $config['driver'], $pdo, $config['database'], $config['prefix'], $config
        );
    }
540100
public static function create(array $config)
    {
        if (!empty($config['url'])) {
            $config['app_id'] = substr(parse_url($config['url'], PHP_URL_PATH), 6);
            $config['key'] = parse_url($config['url'], PHP_URL_USER);
            $config['secret'] = parse_url($config['url'], PHP_URL_PASS);
            $config['scheme'] = parse_url($config['url'], PHP_URL_SCHEME);
            $config['host'] = parse_url($config['url'], PHP_URL_HOST);
            $config['port'] = parse_url($config['url'], PHP_URL_PORT) ?: $config['port'];
        }

        // For backwards compatibility with deprecated host argument
        if (preg_match('(^(https?://))', $config['host'], $matches)) {
            $config['scheme'] = substr($matches[0], 0, -3);
            $config['host'] = substr($config['host'], strlen($matches[0]));
        }

        return new Pusher(
            $config['key'],
            $config['secret'],
            $config['app_id'],
            [
                'scheme' => $config['scheme'],
                'host' => $config['host'],
                'port' => $config['port'],
                'timeout' => $config['timeout'],
                'cluster' => $config['cluster'],
                'debug' => $config['debug'],
            ]
        );
    }
311523
protected function createTokenRepository(array $config)
    {
        return new DatabaseTokenRepository(
            $this->app['db']->connection(),
            $config['table'],
            $this->app['config']['app.key'],
            $config['expire']
        );
    }
666623
public function create(array $config)
    {
        $broLibPath = dirname(dirname($config['binFilePath']));
        $preset = $config['preset'];

        $vendoredPath = $broLibPath . '/../../bro/code';

        $application = new Application();

        if (file_exists($vendoredPath)) {
            $broLibPath = $vendoredPath;
        }

        $broConfigPath = $broLibPath . '/presets/' . basename($preset) . '.php';
        $this->extendApplication($application, $broConfigPath);

        return $application;
    }
1245811
public function config(array $config)
    {
        parent::config($config);

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

        return $this;
    }
413757
public function setConfig(array $config) {
        if (!$config) {
            return $this;
        }

        foreach ($config as $key => $value) {
            switch ($key) {
                case 'open':
                case 'close':
                    $this->setBrackets($config['open'], $config['close']);
                break;
                case 'locale':
                    $this->setLocale($value);
                break;
                case 'disable':
                case 'disabled':
                    $this->disable($value);
                break;
                case 'shorthand':
                case 'shorthandLinks':
                    $this->setShorthand($value);
                break;
                case 'xhtml':
                case 'xhtmlOutput':
                    $this->setXhtml($value);
                break;
                case 'escape':
                case 'escapeHtml':
                    $this->setEscaping($value);
                break;
                case 'strict':
                case 'strictMode':
                    $this->setStrict($value);
                break;
                case 'newlines':
                case 'maxNewlines':
                    $this->setMaxNewlines($value);
                break;
                case 'standaloneTags':
                    $this->setStandaloneTags($value);
                break;
                case 'lineBreaks':
                    $this->setLineBreaks($value);
                break;
                case 'removeEmpty':
                    $this->setRemoveEmptyTags($value);
                break;
                case 'cacheExpires':
                    $this->setCacheExpiration($value);
                break;

                // Doesn't need a setter as it's only used in the constructor
                case 'configPath':
                    $this->_config['configPath'] = $value;
                break;
            }
        }

        return $this;
    }
899352
public static function createRedisByConfig(array $config) {
        $Redis = new Connection();
        $Redis->setHost(@$config['host'])
            ->setPort(@$config['port']);
        (isset($config['persistent']))      && $Redis->setPersistent($config['persistent']);
        (isset($config['connect_timeout'])) && $Redis->setConnectTimeout($config['connect_timeout']);
        (isset($config['connect_tries']))   && $Redis->setConnectTries($config['connect_tries']);
        return $Redis;
    }
611991
protected function pheanstalk(array $config)
    {
        return Pheanstalk::create(
            $config['host'],
            $config['port'] ?? Pheanstalk::DEFAULT_PORT,
            $config['timeout'] ?? Connection::DEFAULT_CONNECT_TIMEOUT
        );
    }
575177
public function setup($config = [])
    {
        $path = toPath($config['path']);

        if (is_array($config)) {
            $this->setCache($config['name']);
            $this->setPath(CYGNITE_BASE.DS.$path.DS);
            $this->setCacheExtension($config['extension']);

            return $this;
        }

        $this->setCache($config);

        return $this;
    }
511496
public function connect(array $config)
    {
        return new RedisQueue(
            $this->redis, $config['queue'],
            Arr::get($config, 'connection', $this->connection),
            Arr::get($config, 'retry_after', 60),
            Arr::get($config, 'block_for', null)
        );
    }
544504
public function connect(array $config)
    {
        $queue = new PHPRedisQueue(
            $this->redis, $config['queue'], Arr::get($config, 'connection', $this->connection)
        );

        $queue->setExpire(Arr::get($config, 'expire', 60));

        return $queue;
    }
792217
public function createNullDriver(array $config)
    {
        return $this->adapt($this->createFlysystem(new \League\Flysystem\Adapter\NullAdapter, $config));
    }