/** * Creates a buzz http adapter. * * @param \Buzz\Browser|null $browser The buzz browser. * @param \Ivory\HttpAdapter\ConfigurationInterface|null $configuration The configuration. * * @throws \Ivory\HttpAdapter\HttpAdapterException If the browser client is multi curl. */ public function __construct(Browser $browser = null, ConfigurationInterface $configuration = null) { $browser = $browser ?: new Browser(); if ($browser->getClient() instanceof MultiCurl) { throw HttpAdapterException::doesNotSupportSubAdapter($this->getName(), get_class($browser->getClient())); } parent::__construct($configuration, $browser->getClient() instanceof AbstractCurl); $this->browser = $browser; }