php-ews Get a calendar event by its subject

24 Views Asked by At

So I'm using https://github.com/Garethp/php-ews and I managed to create an event and get its uID from the item data (the uID the ID that does NOT change when the event changes, unlike the itemId which changes constantly), so far so good...

However, now when I want to make a change to an event that I previously created, I want to SEARCH that very event on the EWS server by its uID (because searching by date range has the risk of catching other events too - which I could of course filter through until I find the correct one... but it would be so much cleaner just to ONLY get the event with the matching uID).

Right now, the only way I found to get events from the calendar is:

//Get all items from 8 AM to 9 AM today
$start = new DateTime('2020-01-05 00:00:00');
$end = new DateTime('2020-01-05 23:59:59');

$items = $calendar->getCalendarItems($start, $end);

My question: is there a way to do something like:

$item = $calendar->getCalendarByUID($uID); 

Any help would be greatly appreciated.

0

There are 0 best solutions below