| 1 | <?php |
||
| 7 | abstract class BaseClass |
||
| 8 | { |
||
| 9 | use UrlTransformer; |
||
| 10 | |||
| 11 | /** @var \GuzzleHttp\Client */ |
||
| 12 | protected $client; |
||
| 13 | |||
| 14 | /** @var Headers */ |
||
| 15 | protected $headers; |
||
| 16 | |||
| 17 | /** @var string The environment this is being run in */ |
||
| 18 | protected $environment; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Instantiate the class. |
||
| 22 | * |
||
| 23 | * @param Client $client |
||
| 24 | * @param Headers $headers |
||
| 25 | * @param string $environment |
||
| 26 | */ |
||
| 27 | 78 | public function __construct(Client $client, Headers $headers, $environment = null) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Get the base URL. This handles the correct |
||
| 36 | * url generation based on production and |
||
| 37 | * test environment. |
||
| 38 | * |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 78 | public function getBaseUrl() |
|
| 45 | } |
||
| 46 |