@@ 100-117 (lines=18) @@ | ||
97 | * @param array $options |
|
98 | * @return Type\ItemIdType[] |
|
99 | */ |
|
100 | public function createContacts($contacts, $options = array()) |
|
101 | { |
|
102 | $request = array('Contact' => $contacts); |
|
103 | ||
104 | $defaultOptions = array( |
|
105 | 'MessageDisposition' => 'SaveOnly', |
|
106 | 'SavedItemFolderId' => array('FolderId' => $this->getFolderId()->toArray()) |
|
107 | ); |
|
108 | $options = array_replace_recursive($defaultOptions, $options); |
|
109 | ||
110 | $result = $this->createItems($request, $options); |
|
111 | ||
112 | if (!is_array($result)) { |
|
113 | $result = array($result); |
|
114 | } |
|
115 | ||
116 | return $result; |
|
117 | } |
|
118 | ||
119 | public function updateContactItem(Type\ItemIdType $itemId, $changes) |
|
120 | { |
@@ 416-430 (lines=15) @@ | ||
413 | * @param array $options |
|
414 | * @return Type |
|
415 | */ |
|
416 | public function getItem($itemId, $options = array()) |
|
417 | { |
|
418 | if ($itemId instanceof Type\ItemIdType) { |
|
419 | $itemId = $itemId->toArray(); |
|
420 | } |
|
421 | ||
422 | $request = array( |
|
423 | 'ItemShape' => array('BaseShape' => 'AllProperties'), |
|
424 | 'ItemIds' => array('ItemId' => $itemId) |
|
425 | ); |
|
426 | ||
427 | $request = array_replace_recursive($request, $options); |
|
428 | ||
429 | return $this->getClient()->GetItem($request); |
|
430 | } |
|
431 | ||
432 | /** |
|
433 | * Get a list of sync changes on a folder |