@@ 62-81 (lines=20) @@ | ||
59 | * @param array $options |
|
60 | * @return Type\ContactItemType[] |
|
61 | */ |
|
62 | public function getContacts($folderId = null, $options = array()) |
|
63 | { |
|
64 | if (!$folderId) { |
|
65 | $folderId = $this->getFolderId(); |
|
66 | } |
|
67 | ||
68 | $request = array( |
|
69 | 'Traversal' => 'Shallow', |
|
70 | 'ItemShape' => array( |
|
71 | 'BaseShape' => 'AllProperties' |
|
72 | ), |
|
73 | 'ParentFolderIds' => $folderId->toArray(true) |
|
74 | ); |
|
75 | ||
76 | $request = array_replace_recursive($request, $options); |
|
77 | ||
78 | $request = Type::buildFromArray($request); |
|
79 | ||
80 | return $this->getClient()->FindItem($request); |
|
81 | } |
|
82 | ||
83 | /** |
|
84 | * @param Type\ItemIdType $itemId |
@@ 340-360 (lines=21) @@ | ||
337 | * @param array $options |
|
338 | * @return Type\BaseFolderType[] |
|
339 | */ |
|
340 | public function getChildrenFolders($parentFolderId = 'root', array $options = array()) |
|
341 | { |
|
342 | if (is_string($parentFolderId)) { |
|
343 | $parentFolderId = $this->getDistinguishedFolderId($parentFolderId); |
|
344 | } |
|
345 | ||
346 | $request = array( |
|
347 | 'Traversal' => 'Shallow', |
|
348 | 'FolderShape' => array( |
|
349 | 'BaseShape' => 'AllProperties' |
|
350 | ), |
|
351 | 'ParentFolderIds' => $parentFolderId->toArray(true) |
|
352 | ); |
|
353 | ||
354 | $request = array_replace_recursive($request, $options); |
|
355 | ||
356 | $request = Type::buildFromArray($request); |
|
357 | ||
358 | /** @var \garethp\ews\API\Message\FindFolderResponseMessageType $folders */ |
|
359 | return $this->getClient()->FindFolder($request); |
|
360 | } |
|
361 | ||
362 | /** |
|
363 | * @param string $folderName |