Makes a new Algolia Client.

@param AlgoliaConfig $config

@return AlgoliaManager

@throws \Exception
483569
public function make(AlgoliaConfig $config)
    {
        return new AlgoliaManager(
            new Client(
                $config->getApplicationId(),
                $config->getApiKey(),
                $config->getHostsArray(),
                $config->getOptions()
            ),
            new ActiveRecordFactory(),
            new ActiveQueryChunker()
        );
    }
369641
public function make(array $config)
    {
        $client = $this->createClient($config);
        $zone = new ZoneRepository($client);
        $ip = new IpRepository($client);

        return new CloudFlareAPI($zone, $ip);
    }
698713
public function createConnection($config)
    {
        $driver = $this->driver_manager->driver(array_get($config, 'driver', ''));

        if (!($driver instanceof \Doctrine\DBAL\Driver)) {
            $driver = $this->driver_manager->driver();
        }

        $params = $config;
        $params['host'] = array_get($params, 'host', array_get($config, 'server'));
        $params['user'] = array_get($params, 'user', array_get($config, 'username'));
        if (!isset($params['driverOptions'])) {
            $params['driverOptions'] = [];
        }
        if (defined('PDO::MYSQL_ATTR_MULTI_STATEMENTS')) {
            $params['driverOptions'][\PDO::MYSQL_ATTR_MULTI_STATEMENTS] = false;
        }
        $params['wrapperClass'] = array_get($config, 'wrapperClass', '\Concrete\Core\Database\Connection\Connection');
        unset($params['driver']);

        $wrapperClass = 'Doctrine\DBAL\Connection';
        if (isset($params['wrapperClass'])) {
            if (is_subclass_of($params['wrapperClass'], $wrapperClass)) {
                $wrapperClass = $params['wrapperClass'];
            } else {
                throw DBALException::invalidWrapperClass($params['wrapperClass']);
            }
        }

        $connection =  new $wrapperClass($params, $driver);
        $connection->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array');
        return $connection;
    }
358476
public static function instance($config = [])
    {
        if (null === self::$instance) {
            self::$instance = new static($config);
        }

        return self::$instance;
    }
1231782
private function createClient(array $config)
    {
        $key     = array_get($config, 'key', env('S3_KEY'));
        $secret  = array_get($config, 'secret', env('S3_SECRET'));
        $region  = array_get($config, 'region', env('S3_REGION'));
        $version = array_get($config, 'version', 'latest');

        return new S3Client([
            'credentials' => ['key' => $key, 'secret' => $secret],
            'region'      => $region,
            'version'     => $version,
        ]);
    }
220195
protected function executeApi(Configuration $config)
    {
        $client = new Client();
        $api = new Jobs($config, $client);
        $repository = new JobsRepository($api, $config);

        $repository->setLogger($this->logger);

        return $repository->persist();
    }
768291
private function generateConfig()
    {
        return new AlgoliaConfig(
            $this->applicationId,
            $this->apiKey,
            $this->hostsArray,
            $this->options
        );
    }
1114148
public function make(array $config)
    {
        Arr::requires($config, ['token']);

        $client = new Client();

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

        $client = new Client();

        return new WebhookGateway($client, $config);
    }
329224
public static function factory($config = array())
	{
		$client = new self($config['baseURL'], $config);
		$client->setDefaultOption('headers/Content-Type', 'application/json');
		$client->setDefaultOption('X-Kinvey-API-Version', 2);
		$client->setAuthMode($config['defaultAuthMode']);

		$client = self::registerPlugins($client);

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

        $client = new Client();

        return new GitterGateway($client, $config);
    }
1211776
public function create(array $config = [])
    {
        if (null === $this->handler) {
            $this->handler = DefaultHandler::create();
        }

        return new Client(
            array_merge_recursive(
                [
                    'verify'  => false,
                    'handler' => $this->handler,
                ],
                $config
            )
        );
    }
1110256
protected function getClient(array $config)
    {
        $client = new CloudsearchClient( 
            $config['client_id'], 
            $config['client_secret'], 
            $config['host'],
            'aliyun'
        );

        $search = new CloudsearchSearch($client);
        $search->addIndex($config['app']);

        return $search;
    }
380675
public function createConnector(array $config)
    {
        if (!isset($config['driver'])) {
            throw new Exception('A driver must be specified.');
        }

        switch ($config['driver']) {
            case 'mysql':
                return new MySqlConnector;
            case 'pgsql':
                return new PostgresConnector;
            case 'sqlite':
                return new SQLiteConnector;
            case 'sqlsrv':
                return new SqlServerConnector;
            case 'filesystem':
                return new FileSystemConnector;
        }
        throw new Exception("Unsupported driver [{$config['driver']}]");
    }
865711
public function connect(array $config)
    {
        $auth = $this->getAuth($config);
        $client = $this->getClient($auth);

        return $this->getAdapter($client);
    }
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;
    }
476432
public function make(array $config): Pusher
    {
        $config = $this->getConfig($config);

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