protected function BrowserBase::createApiClient in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserBase.php \Zumba\GastonJS\Browser\BrowserBase::createApiClient()
Creates an http client to consume the phantomjs API
1 call to BrowserBase::createApiClient()
- Browser::__construct in vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ Browser.php
File
- vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserBase.php, line 28
Class
- BrowserBase
- Class BrowserBase @package Zumba\GastonJS\Browser
Namespace
Zumba\GastonJS\BrowserCode
protected function createApiClient() {
// Provide a BC switch between guzzle 5 and guzzle 6.
if (class_exists('GuzzleHttp\\Psr7\\Response')) {
$this->apiClient = new Client(array(
"base_uri" => $this
->getPhantomJSHost(),
));
}
else {
$this->apiClient = new Client(array(
"base_url" => $this
->getPhantomJSHost(),
));
}
}