Create the Redis client instance.

@param  array  $config
@return \Redis
557379
protected function createClient(array $config)
    {
        return tap(new Redis, function ($client) use ($config) {
            $this->establishConnection($client, $config);

            if (! empty($config['password'])) {
                $client->auth($config['password']);
            }

            if (! empty($config['database'])) {
                $client->select($config['database']);
            }

            if (! empty($config['prefix'])) {
                $client->setOption(Redis::OPT_PREFIX, $config['prefix']);
            }

            if (! empty($config['read_timeout'])) {
                $client->setOption(Redis::OPT_READ_TIMEOUT, $config['read_timeout']);
            }
        });
    }
219222
protected function createRedisDriver(array $config)
	{
		$redis = $this->app['redis'];

		$connection = array_get($config, 'connection', 'default') ?: 'default';

		return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection));
	}
1081956
public static function createFromConfig(array $config)
    {
        $fields = [];
        foreach ($config as $name => $field) {
            $fields[$name] = Fields::create($name, $field);
        }
        return new static($fields);
    }
546741
public function connect(array $config)
	{
		$sqsConfig = array_only($config, array('key', 'secret', 'region', 'default_cache_config'));

		$sqs = SqsClient::factory($sqsConfig);

		return new SqsQueue($sqs, $config['queue']);
	}
823939
public static function create(Config $config)
    {
        if (php_sapi_name() === 'cli' || !(self::$instance instanceof self)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }
292190
private function createSSHHandler(array $config)
    {
        $ssh = new \Net_SSH2($config['hostname'], $config['port'], $config['timeout']);

        $password = $this->getPassword($config);
        if (empty($config['rsa_key'])) {
            $login = $ssh->login($config['username'], $password);
            $type  = 'password';
        } else {
            $login = $ssh->login($config['username'], $this->getKey($config, $password));
            $type  = 'key';
        }

        if ($login !== true) {
            throw new \Exception(
                sprintf(
                    "Failed logging in to %s@%s:%d. Using type: %s. \nErrors: %s",
                    $config['username'],
                    $config['hostname'],
                    $config['port'],
                    $type,
                    json_encode($ssh->getErrors(), true)
                )
            );
        }

        return $ssh;
    }
1259940
public function make(array $config)
    {
        Arr::requires($config, ['token']);

        $client = new Client();

        return new SlackGateway($client, $config);
    }
143080
public function connect(array $config)
	{
		return new DatabaseQueue(
			$this->connections->connection(Arr::get($config, 'connection')),
			$config['table'],
			$config['queue'],
			Arr::get($config, 'expire', 60)
		);
	}
988662
public function make(array $config)
    {
        $driver = $this->getDriver($config);

        // First we will check by the server driver type to see if an extension
        // has been registered specifically for that server.
        if (isset($this->serverExtensions[$driver])) {
            $server = call_user_func($this->serverExtensions[$driver], $config);
        }

        // Create a built-in server with given driver type.
        elseif (method_exists($this, $method = 'create'.Str::studly($driver).'Driver')) {
            $server = $this->$method($config);
        }

        // Otherwise, if the driver type does not support, an exception will be thrown.
        else {
            throw new InvalidArgumentException("Driver [{$driver}] is not supported.");
        }

        $this->configureServer($server, $config);

        return $server;
    }
819571
protected function makeRedisAdapter(array $config)
    {
        if (!isset($config['read_write_timeout'])) {
            $config['read_write_timeout'] = 0;
        }

        $client = $this->container->makeWith('pubsub.redis.redis_client', ['config' => $config]);

        return new RedisPubSubAdapter($client);
    }
476432
public function make(array $config): Pusher
    {
        $config = $this->getConfig($config);

        return $this->getClient($config);
    }
865711
public function connect(array $config)
    {
        $auth = $this->getAuth($config);
        $client = $this->getClient($auth);

        return $this->getAdapter($client);
    }
428828
public static function factory($config = array())
    {
        $defaults = array();

        $required = array(
            'base_url',
            'login',
            'password'
        );

        $config = Collection::fromConfig($config, $defaults, $required);

        $client = new self($config['base_url'], $config);

        return $client;
    }
545186
protected function makeRedisAdapter(array $config)
    {
        if (!isset($config['read_write_timeout'])) {
            $config['read_write_timeout'] = 0;
        }

        $client = $this->container->make('pubsub.redis.redis_client', ['config' => $config]);

        return new RedisPubSubAdapter($client);
    }
689492
protected function initialiseClient(array $config = [])
    {
        if (!isset($config['handler']) || !$config['handler'] instanceof HandlerStack) {
            $handlerStack = HandlerStack::create(new CurlHandler());
            $handlerStack->push(
                Middleware::retry(
                    $this->retryDecider()
                )
            );

            $config['handler'] = $handlerStack;
        }

        return new Client($config);
    }
1182272
public function make(array $config)
    {
        Arr::requires($config, ['token']);

        $client = new Client();

        return new HipchatGateway($client, $config);
    }
671390
public static function createFromConfig(array $config)
    {
        $manager = static::createEmptyFromConfig($config);

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

        return $manager;
       
    }