| 1 | <?php |
||
| 18 | abstract class Package |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $projectId; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $apiKey; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var HttpClient |
||
| 32 | */ |
||
| 33 | private $httpClient; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Constructor. |
||
| 37 | * |
||
| 38 | * @param string $projectId The project ID. |
||
| 39 | * @param string $apiKey The API key |
||
| 40 | * @param HttpClient $httpClient The HTTP client object. |
||
| 41 | */ |
||
| 42 | public function __construct($projectId, $apiKey, HttpClient $httpClient) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Get the project ID. |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | protected function getProjectId() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the API key. |
||
| 61 | * |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | protected function getApiKey() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Get the HTTP client object. |
||
| 71 | * |
||
| 72 | * @return HttpClient |
||
| 73 | */ |
||
| 74 | protected function getHttpClient() |
||
| 78 | |||
| 79 | protected function getBasePath($action) |
||
| 89 | } |
||
| 90 |