\CMClient
Represents a client within the Campaign Monitor database
- Author: Damian Mooyman
Synopsis
class CMClient
extends LazyLoadedCMObject
{
- // members
- protected array $billingDetails = ;
- // Inherited members from LazyLoadedCMObject
- protected boolean $hasLoadedFullDetails;
- // Inherited members from CMObject
- protected array $record;
- // Inherited members from CMBase
- protected $apiKey;
- // methods
- protected void populateFrom()
- public void getTitle()
- public void setTitle()
- public void getID()
- public void setID()
- public array getBillingFields()
- public void setBillingFields()
- public mixed getBillingField()
- public void setBillingField()
- protected void loadFullDetails()
- public ArrayList[CMList] Lists()
- public void Save()
- public ArrayList[CMCampaign] Campaigns()
- // Inherited methods from LazyLoadedCMObject
- protected abstract void loadFullDetails()
- public void LoadByID()
- public void hasField()
- // Inherited methods from CMObject
- public array serializeData()
- public void __construct()
- protected array convertToArray()
- protected void populateFrom()
- public boolean isNew()
- public void hasField()
- public void getField()
- public void setField()
- public abstract void Save()
- // Inherited methods from CMBase
- public void __construct()
- protected void checkResult()
- protected type parseResult()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
24+ | : Merge new data with changed data |
Members
protected
- $apiKey
—
string
The API key used for future requests - $billingDetails
—
array
Provided billing details for this client - $hasLoadedFullDetails
—
boolean
Flag indicating whether all lazy loaded fields have been loaded - $record
—
array
Stored data for this object. May contain nested data
Methods
protected
public
- Campaigns() — Retrieves all campaigns for this client
- Lists() — Retrieves all lists for this client
- Save()
- getBillingField() — Gets a single field from the billing details
- getBillingFields() — Retrieves the billing details for this record
- getID()
- getTitle()
- setBillingField() — Assigns a billing details attribute
- setBillingFields() — Assigns the billing details for this record
- setID()
- setTitle()
Inherited from LazyLoadedCMObject
protected
- loadFullDetails() — Lazy load full details for this client warning: Will overwrite any changed data in $record
public
- LoadByID() — Loads full details into this object from a record with the given id
- hasField()
Inherited from CMObject
protected
- convertToArray() — Parses a stdObject into a nested array recursively, in a format suitable for $this->record
- populateFrom() — Populates the object from the given data
public
- Save() — Saves the object to the database
- getField()
- hasField()
- isNew() — Determine if this is a new object, or one that exists in the database
- serializeData() — Serialises the data into a format suitable to be sent via the CM api.
- setField()
Inherited from CMBase
protected
- checkResult() — Checks that a result is successful
- parseResult() — Safely extracts results from a CM API call