Overview

Namespaces

  • Ctct
    • Auth
    • Components
      • Account
      • Activities
      • Contacts
      • EmailMarketing
      • Library
      • Tracking
    • Exceptions
    • Services
    • Util
    • WebHooks

Classes

  • Ctct\Auth\CtctOAuth2
  • Ctct\Auth\SessionDataStore
  • Ctct\Components\Account\AccountInfo
  • Ctct\Components\Account\VerifiedEmailAddress
  • Ctct\Components\Activities\Activity
  • Ctct\Components\Activities\ActivityError
  • Ctct\Components\Activities\AddContacts
  • Ctct\Components\Activities\AddContactsImportData
  • Ctct\Components\Activities\ExportContacts
  • Ctct\Components\Component
  • Ctct\Components\Contacts\Address
  • Ctct\Components\Contacts\Contact
  • Ctct\Components\Contacts\ContactList
  • Ctct\Components\Contacts\CustomField
  • Ctct\Components\Contacts\EmailAddress
  • Ctct\Components\Contacts\Note
  • Ctct\Components\EmailMarketing\Campaign
  • Ctct\Components\EmailMarketing\ClickThroughDetails
  • Ctct\Components\EmailMarketing\MessageFooter
  • Ctct\Components\EmailMarketing\Schedule
  • Ctct\Components\EmailMarketing\TestSend
  • Ctct\Components\Library\File
  • Ctct\Components\Library\FileUploadStatus
  • Ctct\Components\Library\Folder
  • Ctct\Components\Library\Thumbnail
  • Ctct\Components\ResultSet
  • Ctct\Components\Tracking\BounceActivity
  • Ctct\Components\Tracking\ClickActivity
  • Ctct\Components\Tracking\ForwardActivity
  • Ctct\Components\Tracking\OpenActivity
  • Ctct\Components\Tracking\SendActivity
  • Ctct\Components\Tracking\TrackingActivity
  • Ctct\Components\Tracking\TrackingSummary
  • Ctct\Components\Tracking\UnsubscribeActivity
  • Ctct\ConstantContact
  • Ctct\Services\AccountService
  • Ctct\Services\ActivityService
  • Ctct\Services\BaseService
  • Ctct\Services\CampaignScheduleService
  • Ctct\Services\CampaignTrackingService
  • Ctct\Services\ContactService
  • Ctct\Services\ContactTrackingService
  • Ctct\Services\EmailMarketingService
  • Ctct\Services\LibraryService
  • Ctct\Services\ListService
  • Ctct\SplClassLoader
  • Ctct\Util\Config
  • Ctct\WebHooks\CTCTWebhookUtil

Interfaces

  • Ctct\Auth\CtctDataStore

Exceptions

  • Ctct\Exceptions\CtctException
  • Ctct\Exceptions\IllegalArgumentException
  • Ctct\Exceptions\OAuth2Exception
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Ctct\Components\Activities;
 3: 
 4: use Ctct\Components\Component;
 5: use Ctct\Components\Contacts\Address;
 6: use Ctct\Components\Contacts\CustomField;
 7: 
 8: /**
 9:  * Represents a single Activity in Constant Contact
10:  *
11:  * @package     Components
12:  * @subpackage     Activities
13:  * @author         Constant Contact
14:  */
15: class AddContactsImportData extends Component
16: {
17:     public $first_name;
18:     public $middle_name;
19:     public $last_name;
20:     public $job_title;
21:     public $company_name;
22:     public $work_phone;
23:     public $home_phone;
24:     
25:     public $birthday_day;
26:     public $birthday_month;
27:     public $anniversary;
28:     
29:     public $email_addresses = array();
30:     public $addresses = array();
31:     public $custom_fields = array();
32: 
33:     /**
34:      * Factory method to create an Activity object from an array
35:      * @param array $props - associative array of initial properties to set
36:      */
37:     public function __construct(array $props = array())
38:     {
39:         foreach ($this as $property => $value) {
40:             $this->$property = parent::getValue($props, $property);
41:         }
42:     }
43: 
44:     public function addCustomField(CustomField $customField)
45:     {
46:         $this->custom_fields[] = $customField;
47:     }
48: 
49:     public function addAddress(Address $address)
50:     {
51:         if (isset($address->state)) {
52:             $address->state_code = $address->state;
53:             unset($address->state);
54:         }
55: 
56:         foreach ($address as $key => $value) {
57:             if ($value == null) {
58:                 unset($address->$key);
59:             }
60:         }
61:         $this->addresses[] = $address;
62:     }
63: 
64:     public function addEmail($emailAddress)
65:     {
66:         $this->email_addresses[] = $emailAddress;
67:     }
68: 
69:     public function toJson()
70:     {
71:         return json_encode($this);
72:     }
73: }
74: 
API documentation generated by ApiGen