Exemplo n.º 1
0
 /**
  * Creates a curl http adapter.
  *
  * @param \Ivory\HttpAdapter\ConfigurationInterface|null $configuration  The configuration.
  * @param boolean                                        $checkExtension TRUE if the extension should be checked else FALSE.
  *
  * @throws \Ivory\HttpAdapter\HttpAdapterException If the check extension is enabled and the curl extension is not loaded.
  */
 public function __construct(ConfigurationInterface $configuration = null, $checkExtension = true)
 {
     if ($checkExtension && !function_exists('curl_init')) {
         throw HttpAdapterException::extensionIsNotLoaded('curl', $this->getName());
     }
     parent::__construct($configuration);
 }