You are here

private function CampaignMonitor::libraryLoad in Campaign Monitor 7

Helper function that loads the part of the API.

As defined in the $file variable. This function is mostly used by create[xxx]Obj functions below.

Parameters

string $file: The name of the API file to include.

Return value

bool TRUE on success, FALSE otherwise.

3 calls to CampaignMonitor::libraryLoad()
CampaignMonitor::createClientObj in lib/campaignmonitor.class.inc
Create API client object.
CampaignMonitor::createListObj in lib/campaignmonitor.class.inc
Create API list object.
CampaignMonitor::createSubscriberObj in lib/campaignmonitor.class.inc
Create API subscribers object.

File

lib/campaignmonitor.class.inc, line 217
Implementation of the CampaignMonitor class.

Class

CampaignMonitor
Implementation of the CampaignMonitor class.

Code

private function libraryLoad($file) {
  if ($this
    ->getLibraryPath()) {
    @(require_once $this->libraryPath . '/' . $file);
    return TRUE;
  }
  $this
    ->addError(WATCHDOG_ERROR, t('Unable to load client library.'));
  return FALSE;
}