File: D:/HostingSpaces/farmfun/reserveren.farmfun.be/app/Komma/Teamleader/Base/Endpoint.php
<?php
namespace App\Komma\Teamleader\Base;
use App\Komma\Teamleader\TeamleaderApi;
abstract class Endpoint
{
protected TeamleaderApi $apiClient;
protected string $resourceClass;
/**
* @param TeamleaderApi $apiClient
*/
public function __construct(TeamleaderApi $apiClient)
{
$this->apiClient = $apiClient;
}
/**
* Get the header for a GET request
*
* @param array $headers
* @return array
*/
protected function buildHttpHeaders($headers = []): array
{
$headers = array_merge($headers, [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'Authorization' => $this->apiClient->authentication->getAuthorizationHeaderValue(),
]);
return $headers;
}
}