delete() 공개 메소드

Delete the specified objects from this data set.
public delete ( array | string $object_ids ) : null
$object_ids array | string Id(s) of the object to be deleted.
리턴 null
예제 #1
0
파일: Log.php 프로젝트: horde/horde
 /**
  * Delete the specified objects from this data set.
  *
  * @param array|string $object_ids Id(s) of the object to be deleted.
  *
  * @return NULL
  */
 public function delete($object_ids)
 {
     if (is_array($object_ids)) {
         $ids = join(', ', $object_ids);
     } else {
         $ids = $object_ids;
     }
     $this->_logger->debug(sprintf('Deleting data object(s) %s in %s.', $ids, $this->_data->getPath()));
     $this->_data->delete($object_ids);
     $this->_logger->debug(sprintf('Deleted data object(s) %s in %s.', $ids, $this->_data->getPath()));
 }
예제 #2
0
파일: Kolab.php 프로젝트: Gomez/horde
 /**
  * Deletes an event.
  *
  * @param string $eventId  The ID of the event to delete.
  *
  * @throws Kronolith_Exception
  * @throws Horde_Exception_NotFound
  * @throws Horde_Mime_Exception
  */
 protected function _deleteEvent($eventId, $silent = false)
 {
     if ($eventId instanceof Kronolith_Event) {
         $event = $eventId;
         $this->synchronize();
     } else {
         $event = $this->getEvent($eventId);
     }
     $this->_data->delete($event->uid);
     unset($this->_events_cache[$event->id]);
     /* Notify about the deleted event. */
     if (!$silent) {
         $this->_handleNotifications($event, 'delete');
     }
     return $event;
 }