src/CalendarAPI.php 1 location
|
@@ 32-36 (lines=5) @@
|
| 29 |
|
*/ |
| 30 |
|
public function pickCalendar($displayName = null) |
| 31 |
|
{ |
| 32 |
|
if ($displayName == 'default.calendar' || $displayName == null) { |
| 33 |
|
$this->folderId = $this->getDistinguishedFolderId('calendar'); |
| 34 |
|
} else { |
| 35 |
|
$this->folderId = $this->getFolderByDisplayName($displayName, 'calendar')->getFolderId(); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
return $this; |
| 39 |
|
} |
src/ContactsAPI.php 1 location
|
@@ 24-28 (lines=5) @@
|
| 21 |
|
*/ |
| 22 |
|
public function pickContactsFolder($displayName = null) |
| 23 |
|
{ |
| 24 |
|
if ($displayName === 'default.contacts' || $displayName === null) { |
| 25 |
|
$this->folderId = $this->getDistinguishedFolderId('contacts'); |
| 26 |
|
} else { |
| 27 |
|
$this->folderId = $this->getFolderByDisplayName($displayName, 'contacts')->getFolderId(); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
if ($this->folderId === null) { |
| 31 |
|
throw new Exception('Folder does not exist'); |