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