CampaignMonitor::getClients PHP Method

getClients() public method

Returns all clients for the logged-in user.
public getClients ( ) : array
return array
    public function getClients()
    {
        // make the call
        $records = (array) $this->doCall('clients');
        // stop here if no records were set
        if (empty($records)) {
            return array();
        }
        // reserve variable
        $results = array();
        $i = 0;
        // loop the records
        foreach ($records as $record) {
            $results[$i]['id'] = $record['ClientID'];
            $results[$i]['name'] = $record['Name'];
            $i++;
        }
        // return the records
        return $results;
    }