Horde_Kolab_Storage_Data::objectIdExists PHP Method

objectIdExists() public method

Check if the given object ID exists.
public objectIdExists ( string $object_id ) : boolean
$object_id string The object ID.
return boolean True if the ID was found, false otherwise.
    public function objectIdExists($object_id);

Usage Example

Example #1
0
 /**
  * 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;
 }
All Usage Examples Of Horde_Kolab_Storage_Data::objectIdExists