1: <?php
2:
3: namespace Ctct\Components\Tracking;
4:
5: use Ctct\Components\Component;
6:
7: /**
8: * Represents a Sent Activity
9: *
10: * @package Components
11: * @subpackage CampaignTracking
12: * @author Constant Contact
13: */
14: class SendActivity extends Component
15: {
16: public $activity_type;
17: public $send_date;
18: public $contact_id;
19: public $email_address;
20: public $campaign_id;
21:
22: /**
23: * Factory method to create a SentActivity object from an array
24: * @param array $props - array of properties to create object from
25: * @return SentActivity
26: */
27: public static function create(array $props)
28: {
29: $sent_activity = new SendActivity();
30: $sent_activity->activity_type = parent::getValue($props, "activity_type");
31: $sent_activity->send_date = parent::getValue($props, "send_date");
32: $sent_activity->contact_id = parent::getValue($props, "contact_id");
33: $sent_activity->email_address = parent::getValue($props, "email_address");
34: $sent_activity->campaign_id = parent::getValue($props, "campaign_id");
35: return $sent_activity;
36: }
37: }
38: