function HttpBrowser::__construct
Overrides AbstractBrowser::__construct
File
-
vendor/
symfony/ browser-kit/ HttpBrowser.php, line 34
Class
- HttpBrowser
- An implementation of a browser using the HttpClient component to make real HTTP requests.
Namespace
Symfony\Component\BrowserKitCode
public function __construct(?HttpClientInterface $client = null, ?History $history = null, ?CookieJar $cookieJar = null) {
if (!$client && !class_exists(HttpClient::class)) {
throw new LogicException(\sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
}
$this->client = $client ?? HttpClient::create();
parent::__construct([], $history, $cookieJar);
}