@@ 435-449 (lines=15) @@ | ||
432 | * @param array $options |
|
433 | * @return Type |
|
434 | */ |
|
435 | public function getItem($itemId, $options = array()) |
|
436 | { |
|
437 | if ($itemId instanceof Type\ItemIdType) { |
|
438 | $itemId = $itemId->toArray(); |
|
439 | } |
|
440 | ||
441 | $request = array( |
|
442 | 'ItemShape' => array('BaseShape' => 'AllProperties'), |
|
443 | 'ItemIds' => array('ItemId' => $itemId) |
|
444 | ); |
|
445 | ||
446 | $request = array_replace_recursive($request, $options); |
|
447 | ||
448 | return $this->getClient()->GetItem($request); |
|
449 | } |
|
450 | ||
451 | /** |
|
452 | * Get a list of sync changes on a folder |
@@ 96-113 (lines=18) @@ | ||
93 | * @param array $options |
|
94 | * @return Type\ItemIdType[] |
|
95 | */ |
|
96 | public function createContacts($contacts, $options = array()) |
|
97 | { |
|
98 | $request = array('Contact' => $contacts); |
|
99 | ||
100 | $defaultOptions = array( |
|
101 | 'MessageDisposition' => 'SaveOnly', |
|
102 | 'SavedItemFolderId' => array('FolderId' => $this->getFolderId()->toArray()) |
|
103 | ); |
|
104 | $options = array_replace_recursive($defaultOptions, $options); |
|
105 | ||
106 | $result = $this->createItems($request, $options); |
|
107 | ||
108 | if (!is_array($result)) { |
|
109 | $result = array($result); |
|
110 | } |
|
111 | ||
112 | return $result; |
|
113 | } |
|
114 | ||
115 | public function updateContactItem(Type\ItemIdType $itemId, $changes) |
|
116 | { |