/**
* Checks if the event's UID already exists and returns all event
* ids with that UID.
*
* @param string $uid The event's uid.
* @param string $calendar_id Calendar to search in.
*
* @return string|boolean Returns a string with event_id or false if
* not found.
* @throws Kronolith_Exception
*/
public function exists($uid, $calendar_id = null)
{
// Log error if someone uses this function in an unsupported way
if ($calendar_id != $this->calendar) {
throw new BadMethodCallException(sprintf('Kolab::exists called for calendar %s. Currently active is %s.', $calendar_id, $this->calendar));
}
$this->synchronize();
if ($this->_data->objectIdExists($uid)) {
return $uid;
}
return false;
}