}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _get()
{
* @param array $alarm An alarm hash. See self::get() for format.
* @param boolean $keepsnooze Whether to keep the snooze value unchanged.
*
- * @return TODO
+ * @throws Horde_Alarm_Exception
*/
public function set($alarm, $keepsnooze = false)
{
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _update()
{
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _add()
{
* @param integer $minutes The delay in minutes. A negative value
* dismisses the alarm completely.
*
- * @return TODO
* @throws Horde_Alarm_Exception
*/
public function snooze($id, $user, $minutes)
if ($minutes > 0) {
$alarm['snooze'] = new Horde_Date(time());
$alarm['snooze']->min += $minutes;
- return $this->_snooze($id, $user, $alarm['snooze']);
+ $this->_snooze($id, $user, $alarm['snooze']);
+ return;
}
- return $this->_dismiss($id, $user);
+ $this->_dismiss($id, $user);
}
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _snooze()
{
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _dismiss()
{
* Defaults to now.
*
* @return boolean True if the alarm is snoozed.
+ *
+ * @throws Horde_Alarm_Exception
*/
public function isSnoozed($id, $user, $time = null)
{
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _isSnoozed()
{
*
* @param string $id The alarm's unique id.
* @param string $user The alarm's user. All users' alarms if null.
+ *
+ * @throws Horde_Alarm_Exception
*/
function delete($id, $user = null)
{
- return $this->_delete($id, $user);
+ $this->_delete($id, $user);
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _delete()
{
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _list()
{
* @param array $alarm An alarm hash.
*
* @throws Horde_Mime_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _mail($alarm)
{
}
/**
- * @throws new Horde_Alarm_Exception
+ * @throws Horde_Alarm_Exception
*/
protected function _internal()
{
/**
* Garbage collects old alarms in the backend.
+ *
+ * @throws Horde_Alarm_Exception
*/
public function gc()
{
/* A 1% chance we will run garbage collection during a call. */
if (rand(0, 99) == 0) {
- return $this->_gc();
+ $this->_gc();
}
}
* @param string $user The alarm's user
*
* @return array An alarm hash.
+ * @throws Horde_Alarm_Exception
*/
protected function _get($id, $user)
{
* null, or global alarms if empty.
*
* @return array A list of alarm hashes.
+ * @throws Horde_Alarm_Exception
*/
protected function _list($user, $time)
{
* Adds an alarm hash to the backend.
*
* @param array $alarm An alarm hash.
+ *
+ * @throws Horde_Alarm_Exception
*/
protected function _add($alarm)
{
}
throw new Horde_Alarm_Exception($result);
}
-
- return $result;
}
/**
}
throw new Horde_Alarm_Exception($result);
}
-
- return $result;
}
/**
* @param string $id The alarm's unique id.
* @param string $user The alarm's user
* @param array $internal A hash with the internal data.
+ *
+ * @throws Horde_Alarm_Exception
*/
protected function _internal($id, $user, $internal)
{
}
throw new Horde_Alarm_Exception($result);
}
-
- return $result;
}
/**
* @param string $user The alarm's user
*
* @return boolean True if the specified alarm exists.
+ * @throws Horde_Alarm_Exception
*/
protected function _exists($id, $user)
{
* @param string $id The alarm's unique id.
* @param string $user The alarm's user
* @param Horde_Date $snooze The snooze time.
+ *
+ * @throws Horde_Alarm_Exception
*/
protected function _snooze($id, $user, $snooze)
{
}
throw new Horde_Alarm_Exception($result);
}
-
- return $result;
}
/**
*
* @param string $id The alarm's unique id.
* @param string $user The alarm's user
+ *
+ * @throws Horde_Alarm_Exception
*/
protected function _dismiss($id, $user)
{
}
throw new Horde_Alarm_Exception($result);
}
-
- return $result;
}
/**
* @param Horde_Date $time The time when the alarm may be snoozed.
*
* @return boolean True if the alarm is snoozed.
+ * @throws Horde_Alarm_Exception
*/
protected function _isSnoozed($id, $user, $time)
{
*
* @param string $id The alarm's unique id.
* @param string $user The alarm's user. All users' alarms if null.
+ *
+ * @throws Horde_Alarm_Exception
*/
protected function _delete($id, $user = null)
{
}
throw new Horde_Alarm_Exception($result);
}
-
- return $result;
}
/**
* Garbage collects old alarms in the backend.
+ *
+ * @throws Horde_Alarm_Exception
*/
protected function _gc()
{
/**
* Attempts to open a connection to the SQL server.
+ *
+ * @throws Horde_Alarm_Exception
*/
public function initialize()
{