@@ 382-396 (lines=15) @@ | ||
379 | * @param array $options |
|
380 | * @return Type |
|
381 | */ |
|
382 | public function getItem($itemId, $options = array()) |
|
383 | { |
|
384 | if ($itemId instanceof Type\ItemIdType) { |
|
385 | $itemId = $itemId->toArray(); |
|
386 | } |
|
387 | ||
388 | $request = array( |
|
389 | 'ItemShape' => array('BaseShape' => 'AllProperties'), |
|
390 | 'ItemIds' => array('ItemId' => $itemId) |
|
391 | ); |
|
392 | ||
393 | $request = array_replace_recursive($request, $options); |
|
394 | ||
395 | return $this->getClient()->GetItem($request); |
|
396 | } |
|
397 | ||
398 | /** |
|
399 | * Get a list of sync changes on a folder |
@@ 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 | { |