1: <?php
2: /**
3: * An interface describing a storage location for notification messages.
4: *
5: * @category Horde
6: * @package Notification
7: * @author Gunnar Wrobel <wrobel@pardus.de>
8: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
9: * @link http://pear.horde.org/index.php?package=Notification
10: */
11:
12: /**
13: * An interface describing a storage location for notification messages.
14: *
15: * Copyright 2009-2012 Horde LLC (http://www.horde.org/)
16: *
17: * See the enclosed file COPYING for license information (LGPL). If you
18: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
19: *
20: * @category Horde
21: * @package Notification
22: * @author Gunnar Wrobel <wrobel@pardus.de>
23: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
24: * @link http://pear.horde.org/index.php?package=Notification
25: */
26: interface Horde_Notification_Storage_Interface
27: {
28: /**
29: * Return the given stack from the notification store.
30: *
31: * @param string $key The key for the data.
32: *
33: * @return mixed The notification data stored for the given key.
34: */
35: public function get($key);
36:
37: /**
38: * Set the given stack in the notification store.
39: *
40: * @param string $key The key for the data.
41: * @param mixed $value The data.
42: */
43: public function set($key, $value);
44:
45: /**
46: * Is the given stack present in the notification store?
47: *
48: * @param string $key The key of the data.
49: *
50: * @return boolean True if the element is set, false otherwise.
51: */
52: public function exists($key);
53:
54: /**
55: * Unset the given stack in the notification store.
56: *
57: * @param string $key The key of the data.
58: */
59: public function clear($key);
60:
61: /**
62: * Store a new event.
63: *
64: * @param string $listener The event will be stored for
65: * this listener.
66: * @param Horde_Notification_Event $event The event to store.
67: */
68: public function push($listener, Horde_Notification_Event $event);
69:
70: }
71: