Make a new gitlab client.

@param array $config

@return \Gitlab\Client
345306
public function make(array $config): Client
    {
        $config = $this->getConfig($config);

        return $this->getClient($config);
    }
1170779
protected function createClient(array $config)
    {
        $url = Arr::pull($config, 'url');

        $urls = parse_url($url);

        $config['host'] = $urls['host'];
        $config['port'] = $urls['port'];

        switch ($urls['scheme']) {
            case 'http':
                return new HttpClient($this->app, $this->serializerFactory, $config);
            case 'whisper':
                return new WhisperClient($this->app, $this->serializerFactory, $config);
            default:
                throw new InvalidArgumentException('Protocol '.$urls['scheme'].' is not supported for Homer.');
        }
    }
989876
public function make( array $config, $name = null )
	{
		$config = $this->parseConfig( $config, $name );

		if ( isset( $config['read'] ) )
			return $this->createReadWriteConnection( $config );

		return $this->createSingleConnection( $config );
	}
492132
public static function create($config)
    {

        $clientBuilder = ClientBuilder::create();

        if (!empty($config['handler'])) {
            $clientBuilder->setHandler($config['handler']);
        }

        $clientBuilder->setHosts($config["servers"]);

        $clientBuilder = self::configureLogging($clientBuilder,$config);

        $query = new Query($clientBuilder->build());

        if (array_key_exists("index", $config) and $config["index"] != "") {
            $query->index($config["index"]);
        }

        return $query;
    }
312863
public function connect(array $config)
    {
        $ironConfig = ['token' => $config['token'], 'project_id' => $config['project']];

        if (isset($config['host'])) {
            $ironConfig['host'] = $config['host'];
        }

        $iron = new IronMQ($ironConfig);

        if (isset($config['ssl_verifypeer'])) {
            $iron->ssl_verifypeer = $config['ssl_verifypeer'];
        }

        $queue = new IronQueue($iron, $this->request, $config['queue'], $config['encrypt'], $config['timeout']);
        $queue->setEncrypter($this->crypt);

        return $queue;
    }
430113
public static function make(array $config)
    {
        $builder = self::getBuilder();
        $configObject = $builder->build($config);
        $grid = new Grid($configObject);
        return $grid;
    }
671390
public static function createFromConfig(array $config)
    {
        $manager = static::createEmptyFromConfig($config);

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

        return $manager;
       
    }
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;
    }
1374517
public static function factory($config = array())
    {
        $default = array(
            'masterKey' => null,
            'writeKey'  => null,
            'readKey'   => null,
            'projectId' => null,
            'organizationKey' => null,
            'organizationId' => null,
            'version' => '3.0',
            'headers' => array(
                'Keen-Sdk' => 'php-' . self::VERSION
            )
        );

        // Create client configuration
        $config = self::parseConfig($config, $default);

        $file = 'keen-io-' . str_replace('.', '_', $config['version']) . '.php';

        // Create the new Keen IO Client with our Configuration
        return new self(
            new Client($config),
            new Description(include __DIR__ . "/Resources/{$file}"),
            null,
            function ($arg) {
                return json_decode($arg->getBody(), true);
            },
            null,
            $config
        );
    }
117184
public function make(array $config): Facebook
    {
        $config = $this->getConfig($config);

        return $this->getClient($config);
    }
1264784
private function createClient($config)
    {
        $keyFile = array_get($config, 'key_file');
        if (is_string($keyFile)) {
            return new StorageClient([
                'projectId' => $config['project_id'],
                'keyFilePath' => $keyFile,
            ]);
        }

        if (! is_array($keyFile)) {
            $keyFile = [];
        }
        return new StorageClient([
            'projectId' => $config['project_id'],
            'keyFile' => array_merge(["project_id" => $config['project_id']], $keyFile)
        ]);
    }
302578
protected function createSingleConnection(array $config)
    {
        $pdo = $this->createConnector($config)->connect($config);

        return $this->createConnection($config['driver'], $pdo, $config['database'], $config['prefix'], $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' );
    }
1158155
protected function getClient(array $config)
    {
        $name = array_get($config, 'connector');

        return $this->cache->driver($name)->getStore();
    }
1291547
public function connect(array $config)
    {
        $options = $this->getOptions($config);

        return $this->createConnection($this->getDsn($config), $config, $options);
    }
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']}].");
    }
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'],
            ]
        );
    }