Ctct\Services\BaseService
Super class for all services
- Author: Constant Contact
Synopsis
class BaseService
{
- // members
- public $restClient $restClient;
- protected $apiKey;
- // methods
- public void __construct()
- public string buildUrl()
- public RestClientInterface getRestClient()
- public void setRestClient()
- protected static array getHeaders()
Members
protected
- $apiKey
—
string
ApiKey for the application
public
- $restClient
—
Ctct\Services\$restClient
RestClient Implementation to use for HTTP requests
Methods
protected
- getHeaders() — Helper function to return required headers for making an http request with constant contact
public
- __construct() — Constructor with the option to to supply an alternative rest client to be used
- buildUrl() — Build a url from the base url and query parameters array
- getRestClient() — Get the rest client being used by the service
- setRestClient()