| @@ 76-93 (lines=18) @@ | ||
| 73 | * @param array $options |
|
| 74 | * @return Type\ItemIdType[] |
|
| 75 | */ |
|
| 76 | public function createContacts($contacts, $options = array()) |
|
| 77 | { |
|
| 78 | $request = array('Contact' => $contacts); |
|
| 79 | ||
| 80 | $defaultOptions = array( |
|
| 81 | 'MessageDisposition' => 'SaveOnly', |
|
| 82 | 'SavedItemFolderId' => array('FolderId' => $this->getFolderId()->toArray()) |
|
| 83 | ); |
|
| 84 | $options = array_replace_recursive($defaultOptions, $options); |
|
| 85 | ||
| 86 | $result = $this->createItems($request, $options); |
|
| 87 | ||
| 88 | if (!is_array($result)) { |
|
| 89 | $result = array($result); |
|
| 90 | } |
|
| 91 | ||
| 92 | return $result; |
|
| 93 | } |
|
| 94 | ||
| 95 | public function updateContactItem(Type\ItemIdType $itemId, $changes) |
|
| 96 | { |
|
| @@ 406-420 (lines=15) @@ | ||
| 403 | * @param array $options |
|
| 404 | * @return Type |
|
| 405 | */ |
|
| 406 | public function getItem($itemId, $options = array()) |
|
| 407 | { |
|
| 408 | if ($itemId instanceof Type\ItemIdType) { |
|
| 409 | $itemId = $itemId->toArray(); |
|
| 410 | } |
|
| 411 | ||
| 412 | $request = array( |
|
| 413 | 'ItemShape' => array('BaseShape' => 'AllProperties'), |
|
| 414 | 'ItemIds' => array('ItemId' => $itemId) |
|
| 415 | ); |
|
| 416 | ||
| 417 | $request = array_replace_recursive($request, $options); |
|
| 418 | ||
| 419 | return $this->getClient()->GetItem($request); |
|
| 420 | } |
|
| 421 | ||
| 422 | /** |
|
| 423 | * Get a list of sync changes on a folder |
|