Create an instance of the Rackspace driver.

@param  array $config
@return Cloud
349413
public function createRackspaceDriver( array $config )
	{
		$client = new Rackspace( $config['endpoint'], [
			'username' => $config['username'],
			'apiKey' => $config['key'],
		] );

		$root = isset( $config['root'] ) ? $config['root'] : null;

		return $this->adapt( $this->createFlysystem( new RackspaceAdapter( $this->getRackspaceContainer( $client, $config ), $root ), $config ) );
	}
430113
public static function make(array $config)
    {
        $builder = self::getBuilder();
        $configObject = $builder->build($config);
        $grid = new Grid($configObject);
        return $grid;
    }
135465
public function createS3Driver( array $config )
	{
		$s3Config = $this->formatS3Config( $config );

		$root = isset( $s3Config['root'] ) ? $s3Config['root'] : null;

		$options = isset( $config['options'] ) ? $config['options'] : [];

		return $this->adapt( $this->createFlysystem( new S3Adapter( new S3Client( $s3Config ), $s3Config['bucket'], $root, $options ), $config ) );
	}
1102879
public function make(array $config)
    {
        Arr::requires($config, ['token']);

        $client = new Client();

        return new YoGateway($client, $config);
    }
1208451
public function make(array $config): SearchClient
    {
        $config = $this->getConfig($config);

        return $this->getClient($config);
    }
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']);
	}
614297
public function createLocalDriver( array $config )
	{
		$permissions = isset( $config['permissions'] ) ? $config['permissions'] : [];

		$links = Arr::get( $config, 'links' ) === 'skip' ? LocalAdapter::SKIP_LINKS : LocalAdapter::DISALLOW_LINKS;

		return $this->adapt( $this->createFlysystem( new LocalAdapter( $config['root'], LOCK_EX, $links, $permissions ), $config ) );
	}
348114
protected function makeGoogleCloudAdapter(array $config)
    {
        $clientConfig = [
            'projectId' => $config['project_id'],
            'keyFilePath' => $config['key_file'],
        ];
        if (isset($config['auth_cache'])) {
            $clientConfig['authCache'] = $this->container->make($config['auth_cache']);
        }

        $client = $this->container->makeWith('pubsub.gcloud.pub_sub_client', ['config' => $clientConfig]);

        $clientIdentifier = array_get($config, 'client_identifier');
        $autoCreateTopics = array_get($config, 'auto_create_topics', true);
        $autoCreateSubscriptions = array_get($config, 'auto_create_subscriptions', true);
        $backgroundBatching = array_get($config, 'background_batching', false);
        $backgroundDaemon = array_get($config, 'background_daemon', false);

        if ($backgroundDaemon) {
            putenv('IS_BATCH_DAEMON_RUNNING=true');
        }
        return new GoogleCloudPubSubAdapter(
            $client,
            $clientIdentifier,
            $autoCreateTopics,
            $autoCreateSubscriptions,
            $backgroundBatching
        );
    }
1091971
public function createConnector(array $config)
    {
        if (!isset($config['driver'])) {
            throw new InvalidArgumentException('A driver must be specified.');
        }

        switch ($config['driver']) {
            case 'buzz':
                return new BuzzConnector();
            case 'guzzle':
                return new GuzzleConnector();
            case 'guzzlehttp':
                return new GuzzleHttpConnector();
        }

        throw new InvalidArgumentException("Unsupported driver [{$config['driver']}].");
    }
413855
protected function createRedisDriver(array $config)
    {
        $connection = Arr::get($config, 'connection');

        // Create a Redis Database instance.
        $redis = $this->app->make('redis');

        return new RedisBroadcaster($this->app, $redis, $connection);
    }
1223360
public static function make($name, array $config): ServiceContainer
    {
        $namespace = self::studly($name);
        $application = "\\Liqunx\\Baidu\\{$namespace}\\Application";

        return new $application($config);
    }
1354035
public function make(array $config)
    {
        Arr::requires($config, ['endpoint']);

        $client = new Client();

        return new WebhookGateway($client, $config);
    }
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']);
            }
        });
    }
849472
protected function createSingleConnection(array $config)
    {
        $connector = $this->createConnector($config)->connect($config);

        return $this->createConnection($connector, $config);
    }
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;
    }
1068826
public function build(array $config)
    {
        $container = new Container();
        foreach ((array) $config as $name => $component) {
            if (!is_array($component) || !array_key_exists('component', $component)) {
                $container->register($name, $component);
                continue;
            }

            $component = $this->applyDefaults($component);
            $container->register(
                $name,
                $this->buildDefinition($component['component']),
                $component['shared']
            );
        }

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

        return $this->getClient($config);
    }