1: <?php
2: namespace Ctct\Components\Contacts;
3:
4: use Ctct\Components\Component;
5:
6: 7: 8: 9: 10: 11: 12:
13: class EmailAddress extends Component
14: {
15:
16: 17: 18: 19:
20: public $id;
21:
22: 23: 24: 25: 26:
27: public $status;
28:
29: 30: 31: 32:
33: public $confirm_status;
34:
35: 36: 37: 38:
39: public $opt_in_source;
40:
41: 42: 43: 44:
45: public $opt_in_date;
46:
47: 48: 49: 50:
51: public $opt_out_date;
52:
53: 54: 55: 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: 70: 71: 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: