src/MusicBrainz/HttpAdapters/GuzzleFiveAdapter.php 1 location
|
@@ 20-27 (lines=8) @@
|
| 17 |
|
* @param ClientInterface $client |
| 18 |
|
* @param null $endpoint |
| 19 |
|
*/ |
| 20 |
|
public function __client(ClientInterface $client, $endpoint = null) |
| 21 |
|
{ |
| 22 |
|
$this->client = $client; |
| 23 |
|
|
| 24 |
|
if(filter_var($endpoint, FILTER_VALIDATE_URL)) { |
| 25 |
|
$this->endpoint = $endpoint; |
| 26 |
|
} |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* Perform an HTTP request on MusicBrainz |
src/MusicBrainz/HttpAdapters/GuzzleHttpAdapter.php 1 location
|
@@ 26-33 (lines=8) @@
|
| 23 |
|
* @param \Guzzle\Http\ClientInterface $client The Guzzle client used to make requests |
| 24 |
|
* @param null $endpoint Override the default endpoint (useful for local development) |
| 25 |
|
*/ |
| 26 |
|
public function __construct(ClientInterface $client, $endpoint = null) |
| 27 |
|
{ |
| 28 |
|
$this->client = $client; |
| 29 |
|
|
| 30 |
|
if (filter_var($endpoint, FILTER_VALIDATE_URL)) { |
| 31 |
|
$this->endpoint = $endpoint; |
| 32 |
|
} |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Perform an HTTP request on MusicBrainz |