setConfig() public méthode

Set the configuration array for the adapter
public setConfig ( $config = [] )
 /**
  * @param Enlight_Config $config
  * @see https://github.com/paypal/sdk-core-php
  * @return Zend_Http_Client_Adapter_Curl|Zend_Http_Client_Adapter_Socket
  */
 public static function createAdapterFromConfig($config)
 {
     $curl = $config->get('paypalCurl', true);
     $sslVersion = $config->get('paypalSslVersion', 0);
     $timeout = $config->get('paypalTimeout') ?: 60;
     $userAgent = 'Shopware/' . Shopware::VERSION;
     if ($curl && extension_loaded('curl')) {
         $adapter = new Zend_Http_Client_Adapter_Curl();
         $adapter->setConfig(array('useragent' => $userAgent, 'timeout' => $timeout));
         if (!empty($config->paypalSandbox)) {
             $adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, false);
             $adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, false);
         }
         $adapter->setCurlOption(CURLOPT_TIMEOUT, $timeout);
         $adapter->setCurlOption(CURLOPT_SSLVERSION, $sslVersion);
         //$adapter->setCurlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
         //$adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1);
         //$adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, 2);
     } else {
         $adapter = new Zend_Http_Client_Adapter_Socket();
         $adapter->setConfig(array('useragent' => $userAgent, 'timeout' => $timeout, 'ssltransport' => $sslVersion > 3 || $sslVersion == 1 ? 'tls' : 'ssl'));
     }
     return $adapter;
 }
 /**
  * Returns a reference to the REST client
  *
  * @return Zend_Rest_Client
  */
 public function getRestClient()
 {
     if ($this->_rest === null) {
         /**
          * @see Zend_Rest_Client
          */
         require_once 'Zend/Rest/Client.php';
         $this->_rest = new Zend_Rest_Client();
         /**
          * @see Zend_Http_Client
          */
         require_once 'Zend/Http/Client.php';
         $httpClient = new Zend_Http_Client($this->_baseUri, array('keepalive' => $this->_usePersistentConnections));
         /**
          * The Ticket Evolution Sandbox uses a self-signed certificate which,
          * by default is not allowed. If we are using https in the sandbox lets
          * tweak the options to allow this self-signed certificate.
          *
          * @link http://framework.zend.com/manual/en/zend.http.client.adapters.html Example 2
          */
         if (strpos($this->_baseUri, 'sandbox') !== false) {
             $streamOptions = array('ssl' => array('allow_self_signed' => true));
         } else {
             $streamOptions = array();
         }
         /**
          * Create an adapter object and attach it to the HTTP client
          *
          * @see Zend_Http_Client_Adapter_Socket
          */
         require_once 'Zend/Http/Client/Adapter/Socket.php';
         $adapter = new Zend_Http_Client_Adapter_Socket();
         $adapterConfig = array('persistent' => $this->_usePersistentConnections);
         $adapter->setConfig($adapterConfig);
         $httpClient->setAdapter($adapter);
         // Pass the streamOptions array to setStreamContext()
         $adapter->setStreamContext($streamOptions);
         $this->_rest->setHttpClient($httpClient);
     }
     return $this->_rest;
 }