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\Contacts;
 3: 
 4: use Ctct\Components\Component;
 5: 
 6: /**
 7:  * Represents a single EmailAddress of a Contact
 8:  *
 9:  * @package        Components
10:  * @subpackage     Contacts
11:  * @author         Constant Contact
12:  */
13: class EmailAddress extends Component
14: {
15: 
16:     /**
17:      * Id of the email address
18:      * @var string
19:      */
20:     public $id;
21: 
22:     /**
23:      * Status of the email address, must be one of "ACTIVE", "UNCONFIRMED", "OPTOUT", "REMOVED",
24:      * "NON_SUBSCRIBER", "VISITOR"
25:      * @var string
26:      */
27:     public $status;
28: 
29:     /**
30:      * Contact's confirmation status, must be one of "CONFIRMED", "NO_CONFIRMATION_REQUIRED", "UNCONFIRMED"
31:      * @var string
32:      */
33:     public $confirm_status;
34: 
35:     /**
36:      * Contact's opt in source, must be one of "ACTION_BY_VISITOR", "ACTION_BY_OWNER"
37:      * @var string
38:      */
39:     public $opt_in_source;
40: 
41:     /**
42:      * Contact's opt in date in ISO 8601 format
43:      * @var string
44:      */
45:     public $opt_in_date;
46: 
47:     /**
48:      * Contact's opt out date in ISO 8601 format
49:      * @var string
50:      */
51:     public $opt_out_date;
52: 
53:     /**
54:      * Email address associated with the contact
55:      * @var string
56:      */
57:     public $email_address;
58: 
59:     public function __construct($email_address = null)
60:     {
61:         if (!is_null($email_address)) {
62:             $this->email_address = $email_address;
63:         }
64: 
65:         return $this;
66:     }
67: 
68:     /**
69:      * Factory method to create an EmailAddress object from an array
70:      * @param array $props - Associative array of initial properties to set
71:      * @return EmailAddress
72:      */
73:     public static function create(array $props)
74:     {
75:         $email_address = new EmailAddress();
76:         $email_address->id = parent::getValue($props, "id");
77:         $email_address->status = parent::getValue($props, "status");
78:         $email_address->confirm_status = parent::getValue($props, "confirm_status");
79:         $email_address->opt_in_source = parent::getValue($props, "opt_in_source");
80:         $email_address->opt_in_date = parent::getValue($props, "opt_in_date");
81:         $email_address->opt_out_date = parent::getValue($props, "opt_out_date");
82:         $email_address->email_address = parent::getValue($props, "email_address");
83:         return $email_address;
84:     }
85: }
86: 
API documentation generated by ApiGen