Horde_Alarm::listAlarms PHP Méthode

listAlarms() public méthode

Returns a list of alarms from the backend.
public listAlarms ( string $user = null, Horde_Date $time = null, boolean $load = false, boolean $preload = true ) : array
$user string Return alarms for this user, all users if null, or global alarms if empty.
$time Horde_Date The time when the alarms should be active. Defaults to now.
$load boolean Update active alarms from all applications?
$preload boolean Preload alarms that go off within the next ttl time span?
Résultat array A list of alarm hashes.
    public function listAlarms($user = null, Horde_Date $time = null, $load = false, $preload = true)
    {
        if (empty($time)) {
            $time = new Horde_Date(time());
        }
        if ($load && is_callable($this->_loader)) {
            call_user_func($this->_loader, $user, $preload);
        }
        $alarms = $this->_list($user, $time);
        foreach (array_keys($alarms) as $alarm) {
            if (isset($alarms[$alarm]['mail']['body'])) {
                $alarms[$alarm]['mail']['body'] = $this->_fromDriver($alarms[$alarm]['mail']['body']);
            }
        }
        return $alarms;
    }