public function setConfig()

in src/Transport/Adapter/Guzzle.php [23:43]


    public function setConfig(ClientInterface $client, array $config, array $clientOptions): ClientInterface
    {
        $guzzleConfig = [];
        foreach ($config as $key => $value) {
            switch ($key) {
                case RequestOptions::SSL_CERT:
                    $guzzleConfig[GuzzleOptions::CERT] = $value;
                    break;
                case RequestOptions::SSL_KEY:
                    $guzzleConfig[GuzzleOptions::SSL_KEY] = $value;
                    break;
                case RequestOptions::SSL_VERIFY:
                    $guzzleConfig[GuzzleOptions::VERIFY] = $value;
                    break;
                case RequestOptions::SSL_CA:
                    $guzzleConfig[GuzzleOptions::VERIFY] = $value;
            }
        }
        $class = get_class($client);
        return new $class(array_merge($clientOptions, $guzzleConfig));
    }