예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function createClient(array $config = [])
 {
     if (!class_exists('Http\\Adapter\\Buzz\\Client')) {
         throw new \LogicException('To use the Buzz adapter you need to install the "php-http/buzz-adapter" package.');
     }
     $client = new FileGetContents();
     $options = $this->getOptions($config);
     $client->setTimeout($options['timeout']);
     $client->setVerifyPeer($options['verify_peer']);
     $client->setVerifyHost($options['verify_host']);
     $client->setProxy($options['proxy']);
     return new Adapter($client, $this->messageFactory);
 }