public function HttpClient::__construct in HTTP Client Manager 8
Same name and namespace in other branches
- 8.2 src/HttpClient.php \Drupal\http_client_manager\HttpClient::__construct()
Constructs an HttpClient object
Parameters
string $serviceApi: The service api name for this instance.
\Drupal\http_client_manager\HttpServiceApiHandlerInterface $apiHandler: The service api handler instance.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher instance.
File
- src/
HttpClient.php, line 57
Class
Namespace
Drupal\http_client_managerCode
public function __construct($serviceApi, HttpServiceApiHandlerInterface $apiHandler, EventDispatcherInterface $event_dispatcher) {
$this->serviceApi = $serviceApi;
$this->apiHandler = $apiHandler;
$this->api = $this->apiHandler
->load($this->serviceApi);
$this->eventDispatcher = $event_dispatcher;
}