Sunnysideup\CampaignMonitorApi\Api\CampaignMonitorAPIConnectorBase
Synopsis
class CampaignMonitorAPIConnectorBase
{
- // members
- protected bool $debug = false;
- protected bool $allowCaching = false;
- protected integer $httpStatusCode = 0;
- private static string $campaign_monitor_url = '';
- private static string $client_id = '';
- private static string $api_key = '';
- private static string $client_secret = '';
- private static string $redirect_uri = '';
- private static string $code = '';
- private static string $error_code = '';
- private static string $error_description = '';
- // methods
- public static void get_last_error_code()
- public static void get_last_error_description()
- public void init()
- public void setDebug()
- public void setAllowCaching()
- public bool getAllowCaching()
- public int getHttpStatusCode()
- protected array getAuth()
- protected mixed returnResult()
- protected mixed getFromCache()
- protected void saveToCache()
- protected void getCache()
- protected void getApiKey()
- protected void getClientId()
- protected void getClientSecret()
- protected void getCode()
- protected void getRedirectUri()
- protected void getEnvOrConfigVar()
- protected void cleanCustomFields()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
Members
private
- $api_key
—
string
OPTION 1: API KEY! - $campaign_monitor_url
—
string
REQUIRED! this is the CM url for logging in. - $client_id
—
string
REQUIRED! - $client_secret
—
string
OPTION 2: OAUTH OPTION. - $code
—
string
OPTION 2: OAUTH OPTION. - $error_code
- $error_description
- $redirect_uri
—
string
OPTION 2: OAUTH OPTION.
protected
- $allowCaching — Sunnysideup\CampaignMonitorApi\Api\bool
- $debug — Sunnysideup\CampaignMonitorApi\Api\bool
- $httpStatusCode — int
Methods
protected
- cleanCustomFields()
- getApiKey()
- getAuth() — provides the Authorisation Array.
- getCache()
- getClientId()
- getClientSecret()
- getCode()
- getEnvOrConfigVar()
- getFromCache()
- getRedirectUri()
- returnResult() — returns the result or NULL in case of an error NULL RESULT IS ERROR!
- saveToCache()
public
- getAllowCaching()
- getHttpStatusCode() — returns the HTTP code for the response.
- get_last_error_code()
- get_last_error_description()
- init() — must be called to use this API.
- setAllowCaching()
- setDebug() — turn debug on or off.