1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11: class Horde_ActiveSync_Message_Contact extends Horde_ActiveSync_Message_Base
12: {
13:
14: public $categories = array();
15: public $children = array();
16: public $bodytruncated = 0;
17:
18:
19: const ANNIVERSARY = "POOMCONTACTS:Anniversary";
20: const ASSISTANTNAME = "POOMCONTACTS:AssistantName";
21: const ASSISTNAMEPHONENUMBER = "POOMCONTACTS:AssistnamePhoneNumber";
22: const BIRTHDAY = "POOMCONTACTS:Birthday";
23: const BODY = "POOMCONTACTS:Body";
24: const BODYSIZE = "POOMCONTACTS:BodySize";
25: const BODYTRUNCATED = "POOMCONTACTS:BodyTruncated";
26: const BUSINESS2PHONENUMBER = "POOMCONTACTS:Business2PhoneNumber";
27: const BUSINESSCITY = "POOMCONTACTS:BusinessCity";
28: const BUSINESSCOUNTRY = "POOMCONTACTS:BusinessCountry";
29: const BUSINESSPOSTALCODE = "POOMCONTACTS:BusinessPostalCode";
30: const BUSINESSSTATE = "POOMCONTACTS:BusinessState";
31: const BUSINESSSTREET = "POOMCONTACTS:BusinessStreet";
32: const BUSINESSFAXNUMBER = "POOMCONTACTS:BusinessFaxNumber";
33: const BUSINESSPHONENUMBER = "POOMCONTACTS:BusinessPhoneNumber";
34: const CARPHONENUMBER = "POOMCONTACTS:CarPhoneNumber";
35: const CATEGORIES = "POOMCONTACTS:Categories";
36: const CATEGORY = "POOMCONTACTS:Category";
37: const CHILDREN = "POOMCONTACTS:Children";
38: const CHILD = "POOMCONTACTS:Child";
39: const COMPANYNAME = "POOMCONTACTS:CompanyName";
40: const DEPARTMENT = "POOMCONTACTS:Department";
41: const EMAIL1ADDRESS = "POOMCONTACTS:Email1Address";
42: const EMAIL2ADDRESS = "POOMCONTACTS:Email2Address";
43: const EMAIL3ADDRESS = "POOMCONTACTS:Email3Address";
44: const FILEAS = "POOMCONTACTS:FileAs";
45: const FIRSTNAME = "POOMCONTACTS:FirstName";
46: const HOME2PHONENUMBER = "POOMCONTACTS:Home2PhoneNumber";
47: const HOMECITY = "POOMCONTACTS:HomeCity";
48: const HOMECOUNTRY = "POOMCONTACTS:HomeCountry";
49: const HOMEPOSTALCODE = "POOMCONTACTS:HomePostalCode";
50: const HOMESTATE = "POOMCONTACTS:HomeState";
51: const HOMESTREET = "POOMCONTACTS:HomeStreet";
52: const HOMEFAXNUMBER = "POOMCONTACTS:HomeFaxNumber";
53: const HOMEPHONENUMBER = "POOMCONTACTS:HomePhoneNumber";
54: const JOBTITLE = "POOMCONTACTS:JobTitle";
55: const LASTNAME = "POOMCONTACTS:LastName";
56: const MIDDLENAME = "POOMCONTACTS:MiddleName";
57: const MOBILEPHONENUMBER = "POOMCONTACTS:MobilePhoneNumber";
58: const OFFICELOCATION = "POOMCONTACTS:OfficeLocation";
59: const OTHERCITY = "POOMCONTACTS:OtherCity";
60: const OTHERCOUNTRY = "POOMCONTACTS:OtherCountry";
61: const OTHERPOSTALCODE = "POOMCONTACTS:OtherPostalCode";
62: const OTHERSTATE = "POOMCONTACTS:OtherState";
63: const OTHERSTREET = "POOMCONTACTS:OtherStreet";
64: const = "POOMCONTACTS:PagerNumber";
65: const RADIOPHONENUMBER = "POOMCONTACTS:RadioPhoneNumber";
66: const SPOUSE = "POOMCONTACTS:Spouse";
67: const SUFFIX = "POOMCONTACTS:Suffix";
68: const TITLE = "POOMCONTACTS:Title";
69: const WEBPAGE = "POOMCONTACTS:WebPage";
70: const YOMICOMPANYNAME = "POOMCONTACTS:YomiCompanyName";
71: const YOMIFIRSTNAME = "POOMCONTACTS:YomiFirstName";
72: const YOMILASTNAME = "POOMCONTACTS:YomiLastName";
73: const RTF = "POOMCONTACTS:Rtf";
74: const PICTURE = "POOMCONTACTS:Picture";
75:
76:
77: const CUSTOMERID = "POOMCONTACTS2:CustomerId";
78: const GOVERNMENTID = "POOMCONTACTS2:GovernmentId";
79: const IMADDRESS = "POOMCONTACTS2:IMAddress";
80: const IMADDRESS2 = "POOMCONTACTS2:IMAddress2";
81: const IMADDRESS3 = "POOMCONTACTS2:IMAddress3";
82: const MANAGERNAME = "POOMCONTACTS2:ManagerName";
83: const COMPANYMAINPHONE = "POOMCONTACTS2:CompanyMainPhone";
84: const ACCOUNTNAME = "POOMCONTACTS2:AccountName";
85: const NICKNAME = "POOMCONTACTS2:NickName";
86: const MMS = "POOMCONTACTS2:MMS";
87:
88: protected $_mapping = array(
89: self::ANNIVERSARY => array(self::KEY_ATTRIBUTE => 'anniversary', self::KEY_TYPE => self::TYPE_DATE_DASHES),
90: self::ASSISTANTNAME => array(self::KEY_ATTRIBUTE => 'assistantname'),
91: self::ASSISTNAMEPHONENUMBER => array(self::KEY_ATTRIBUTE => 'assistnamephonenumber'),
92: self::BIRTHDAY => array(self::KEY_ATTRIBUTE => 'birthday', self::KEY_TYPE => self::TYPE_DATE_DASHES),
93: self::BODY => array(self::KEY_ATTRIBUTE => 'body'),
94: self::BODYSIZE => array(self::KEY_ATTRIBUTE => 'bodysize'),
95: self::BODYTRUNCATED => array(self::KEY_ATTRIBUTE => 'bodytruncated'),
96: self::BUSINESS2PHONENUMBER => array(self::KEY_ATTRIBUTE => 'business2phonenumber'),
97: self::BUSINESSCITY => array(self::KEY_ATTRIBUTE => 'businesscity'),
98: self::BUSINESSCOUNTRY => array(self::KEY_ATTRIBUTE => 'businesscountry'),
99: self::BUSINESSPOSTALCODE => array(self::KEY_ATTRIBUTE => 'businesspostalcode'),
100: self::BUSINESSSTATE => array(self::KEY_ATTRIBUTE => 'businessstate'),
101: self::BUSINESSSTREET => array(self::KEY_ATTRIBUTE => 'businessstreet'),
102: self::BUSINESSFAXNUMBER => array(self::KEY_ATTRIBUTE => 'businessfaxnumber'),
103: self::BUSINESSPHONENUMBER => array(self::KEY_ATTRIBUTE => 'businessphonenumber'),
104: self::CARPHONENUMBER => array(self::KEY_ATTRIBUTE => 'carphonenumber'),
105: self::CHILDREN => array(self::KEY_ATTRIBUTE => 'children', self::KEY_VALUES => self::CHILD),
106: self::COMPANYNAME => array(self::KEY_ATTRIBUTE => 'companyname'),
107: self::DEPARTMENT => array(self::KEY_ATTRIBUTE => 'department'),
108: self::EMAIL1ADDRESS => array(self::KEY_ATTRIBUTE => 'email1address'),
109: self::EMAIL2ADDRESS => array(self::KEY_ATTRIBUTE => 'email2address'),
110: self::EMAIL3ADDRESS => array(self::KEY_ATTRIBUTE => 'email3address'),
111: self::FILEAS => array(self::KEY_ATTRIBUTE => 'fileas'),
112: self::FIRSTNAME => array(self::KEY_ATTRIBUTE => 'firstname'),
113: self::HOME2PHONENUMBER => array(self::KEY_ATTRIBUTE => 'home2phonenumber'),
114: self::HOMECITY => array(self::KEY_ATTRIBUTE => 'homecity'),
115: self::HOMECOUNTRY => array(self::KEY_ATTRIBUTE => 'homecountry'),
116: self::HOMEPOSTALCODE => array(self::KEY_ATTRIBUTE => 'homepostalcode'),
117: self::HOMESTATE => array(self::KEY_ATTRIBUTE => 'homestate'),
118: self::HOMESTREET => array(self::KEY_ATTRIBUTE => 'homestreet'),
119: self::HOMEFAXNUMBER => array(self::KEY_ATTRIBUTE => 'homefaxnumber'),
120: self::HOMEPHONENUMBER => array(self::KEY_ATTRIBUTE => 'homephonenumber'),
121: self::JOBTITLE => array(self::KEY_ATTRIBUTE => 'jobtitle'),
122: self::LASTNAME => array(self::KEY_ATTRIBUTE => 'lastname'),
123: self::MIDDLENAME => array(self::KEY_ATTRIBUTE => 'middlename'),
124: self::MOBILEPHONENUMBER => array(self::KEY_ATTRIBUTE => 'mobilephonenumber'),
125: self::OFFICELOCATION => array(self::KEY_ATTRIBUTE => 'officelocation'),
126: self::OTHERCITY => array(self::KEY_ATTRIBUTE => 'othercity'),
127: self::OTHERCOUNTRY => array(self::KEY_ATTRIBUTE => 'othercountry'),
128: self::OTHERPOSTALCODE => array(self::KEY_ATTRIBUTE => 'otherpostalcode'),
129: self::OTHERSTATE => array(self::KEY_ATTRIBUTE => 'otherstate'),
130: self::OTHERSTREET => array(self::KEY_ATTRIBUTE => 'otherstreet'),
131: self::PAGERNUMBER => array(self::KEY_ATTRIBUTE => 'pagernumber'),
132: self::RADIOPHONENUMBER => array(self::KEY_ATTRIBUTE => 'radiophonenumber'),
133: self::SPOUSE => array(self::KEY_ATTRIBUTE => 'spouse'),
134: self::SUFFIX => array(self::KEY_ATTRIBUTE => 'suffix'),
135: self::TITLE => array(self::KEY_ATTRIBUTE => 'title'),
136: self::WEBPAGE => array(self::KEY_ATTRIBUTE => 'webpage'),
137: self::YOMICOMPANYNAME => array(self::KEY_ATTRIBUTE => 'yomicompanyname'),
138: self::YOMIFIRSTNAME => array(self::KEY_ATTRIBUTE => 'yomifirstname'),
139: self::YOMILASTNAME => array(self::KEY_ATTRIBUTE => 'yomilastname'),
140: self::RTF => array(self::KEY_ATTRIBUTE => 'rtf'),
141: self::PICTURE => array(self::KEY_ATTRIBUTE => 'picture'),
142: self::CATEGORIES => array(self::KEY_ATTRIBUTE => 'categories', self::KEY_VALUES => self::CATEGORY),
143:
144:
145: self::CUSTOMERID => array(self::KEY_ATTRIBUTE => 'customerid'),
146: self::GOVERNMENTID => array(self::KEY_ATTRIBUTE => 'governmentid'),
147: self::IMADDRESS => array(self::KEY_ATTRIBUTE => 'imaddress'),
148: self::IMADDRESS2 => array(self::KEY_ATTRIBUTE => 'imaddress2'),
149: self::IMADDRESS3 => array(self::KEY_ATTRIBUTE => 'imaddress3'),
150: self::MANAGERNAME => array(self::KEY_ATTRIBUTE => 'managername'),
151: self::COMPANYMAINPHONE => array(self::KEY_ATTRIBUTE => 'companymainphone'),
152: self::ACCOUNTNAME => array(self::KEY_ATTRIBUTE => 'accountname'),
153: self::NICKNAME => array(self::KEY_ATTRIBUTE => 'nickname'),
154: self::MMS => array(self::KEY_ATTRIBUTE => 'mms'),
155: );
156:
157: protected $_properties = array(
158: 'anniversary' => false,
159: 'assistantname' => false,
160: 'assistnamephonenumber' => false,
161: 'birthday' => false,
162: 'body' => false,
163: 'bodysize' => false,
164: 'bodytruncated' => false,
165: 'business2phonenumber' => false,
166: 'businesscity' => false,
167: 'businesscountry' => false,
168: 'businesspostalcode' => false,
169: 'businessstate' => false,
170: 'businessstreet' => false,
171: 'businessfaxnumber' => false,
172: 'businessphonenumber' => false,
173: 'carphonenumber' => false,
174: 'children' => false,
175: 'companyname' => false,
176: 'department' => false,
177: 'email1address' => false,
178: 'email2address' => false,
179: 'email3address' => false,
180: 'fileas' => false,
181: 'firstname' => false,
182: 'home2phonenumber' => false,
183: 'homecity' => false,
184: 'homecountry' => false,
185: 'homepostalcode' => false,
186: 'homestate' => false,
187: 'homestreet' => false,
188: 'homefaxnumber' => false,
189: 'homephonenumber' => false,
190: 'jobtitle' => false,
191: 'lastname' => false,
192: 'middlename' => false,
193: 'mobilephonenumber' => false,
194: 'officelocation' => false,
195: 'othercity' => false,
196: 'othercountry' => false,
197: 'otherpostalcode' => false,
198: 'otherstate' => false,
199: 'otherstreet' => false,
200: 'pagernumber' => false,
201: 'radiophonenumber' => false,
202: 'spouse' => false,
203: 'suffix' => false,
204: 'title' => false,
205: 'webpage' => false,
206: 'yomicompanyname' => false,
207: 'yomifirstname' => false,
208: 'yomilastname' => false,
209: 'rtf' => false,
210: 'picture' => false,
211: 'categories' => false,
212:
213:
214: 'customerid' => false,
215: 'governmentid' => false,
216: 'imaddress' => false,
217: 'imaddress2' => false,
218: 'imaddress3' => false,
219: 'managername' => false,
220: 'companymainphone' => false,
221: 'accountname' => false,
222: 'nickname' => false,
223: 'mms' => false,
224: );
225:
226: public function getClass()
227: {
228: return 'Contacts';
229: }
230:
231: protected function _checkSendEmpty($tag)
232: {
233: if ($tag == self::BODYTRUNCATED && $this->bodysize > 0) {
234: return true;
235: }
236:
237: return false;
238: }
239:
240: }
241: