HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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;
    }
}