src/Service/Factory.php 1 location
|
@@ 76-83 (lines=8) @@
|
73 |
|
* |
74 |
|
* @param HttpClient|ClientInterface $httpClient |
75 |
|
*/ |
76 |
|
public function setHttpClient($httpClient): void |
77 |
|
{ |
78 |
|
if (!$httpClient instanceof ClientInterface && !$httpClient instanceof HttpClient) { |
79 |
|
throw new \LogicException('Client must be an instance of Http\\Client\\HttpClient or Psr\\Http\\Client\\ClientInterface'); |
80 |
|
} |
81 |
|
|
82 |
|
$this->httpClient = $httpClient; |
83 |
|
} |
84 |
|
|
85 |
|
/** |
86 |
|
* Sets the request factory. |
src/Builder.php 1 location
|
@@ 113-122 (lines=10) @@
|
110 |
|
* |
111 |
|
* @return Builder |
112 |
|
*/ |
113 |
|
public function useHttpClient($httpClient): self |
114 |
|
{ |
115 |
|
if (!$httpClient instanceof ClientInterface && !$httpClient instanceof HttpClient) { |
116 |
|
throw new \LogicException('Client must be an instance of Http\\Client\\HttpClient or Psr\\Http\\Client\\ClientInterface'); |
117 |
|
} |
118 |
|
|
119 |
|
$this->httpClient = $httpClient; |
120 |
|
|
121 |
|
return $this; |
122 |
|
} |
123 |
|
|
124 |
|
/** |
125 |
|
* Uses the given request factory. |