$sparam = $server_params;
$sparam['pass'] = isset($sparam['pass']) ? md5($sparam['pass']) : '';
ksort($sparam);
- $signature = serialize(array($driver, $sparam));
+ $signature = serialize(array($driver, $sparam));
if (empty($instances[$signature])) {
$instances[$signature] = &Horde_Kolab_Server::factory($driver,
$server_params);
abstract public function save($uid, $data, $exists = false);
/**
+ * Delete an object.
+ *
+ * @param string $uid The UID of the object to be deleted.
+ *
+ * @return boolean True if saving succeeded.
+ *
+ * @throws Horde_Kolab_Server_Exception
+ */
+ abstract public function delete($uid);
+
+ /**
* List all objects of a specific type
*
* @param string $type The type of the objects to be listed
array('dn' => $uid)),
);
}
+ Horde::logMessage(sprintf('The object \"%s\" has been successfully saved!',
+ $uid),
+ __FILE__, __LINE__, PEAR_LOG_DEBUG);
$this->store();
}
/**
+ * Delete an object.
+ *
+ * @param string $uid The UID of the object to be deleted.
+ *
+ * @return boolean True if saving succeeded.
+ *
+ * @throws Horde_Kolab_Server_Exception
+ */
+ public function delete($uid)
+ {
+ if (isset($this->data[$uid])) {
+ unset($this->data[$uid]);
+ }
+ $this->store();
+ Horde::logMessage(sprintf('The object \"%s\" has been successfully deleted!',
+ $uid),
+ __FILE__, __LINE__, PEAR_LOG_DEBUG);
+ return true;
+ }
+
+ /**
* Return the schema for the given objectClass.
*
* @param string $objectclass Fetch the schema for this objectClass.