프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_decorators | array | Decorators. | |
$_forceAttach | boolean | Forces immediate attachment of a notification to a listener. | |
$_handles | array | Additional handle definitions. | |
$_listeners | array | Hash containing all attached listener objects. | |
$_storage | Horde_Notification_Storage | The storage location where we store the messages. |
메소드 | 설명 | |
---|---|---|
__construct ( Horde_Notification_Storage_Interface $storage ) | Initialize the notification system. | |
addDecorator ( Horde_Notification_Handler_Decorator_Base $decorator ) | Add a decorator. | |
addType ( string $listener, string $type, string $class ) | Adds a type handler to a given Listener. | |
attach ( string $listener, array $params = null, string $class = null ) : Horde_Notification_Listener | Registers a listener with the notification object and includes the necessary library file dynamically. | |
clear ( string $listener = null ) | Clear any notification events that may exist in a listener. | |
count ( string $my_listener = null ) : integer | Return the number of notification messages in the stack. | |
detach ( $listener ) | Remove a listener from the notification list. | |
get ( string $type ) : mixed | Returns the current Listener object for a given listener type. | |
getListener ( string $listener ) : mixed | Returns a listener object given a listener name. | |
notify ( array $options = [] ) | Passes the message stack to all listeners and asks them to handle their messages. | |
push ( mixed $event, string $type = null, array $flags = [], array $options = [] ) | Add an event to the Horde message stack. |
메소드 | 설명 | |
---|---|---|
_addTypes ( string $listener ) | Adds any additional listener types to a given Listener. |
public __construct ( Horde_Notification_Storage_Interface $storage ) | ||
$storage | Horde_Notification_Storage_Interface | The storage object to use. |
public addDecorator ( Horde_Notification_Handler_Decorator_Base $decorator ) | ||
$decorator | Horde_Notification_Handler_Decorator_Base | The Decorator object. |
$ob->addType('default', '*', $classname);
public attach ( string $listener, array $params = null, string $class = null ) : Horde_Notification_Listener | ||
$listener | string | The name of the listener to attach. These names must be unique; further listeners with the same name will be ignored. |
$params | array | A hash containing any additional configuration or connection parameters a listener driver might need. |
$class | string | The class name from which the driver was instantiated if not the default one. If given you have to include the library file containing this class yourself. This is useful if you want the listener driver to be overriden by an application's implementation |
리턴 | Horde_Notification_Listener | The listener object. |
public getListener ( string $listener ) : mixed | ||
$listener | string | The listener name. |
리턴 | mixed | Either a Horde_Notification_Listener or null. |
public notify ( array $options = [] ) | ||
$options | array | An array containing display options for the
listeners. Any options not contained in this
list will be passed to the listeners.
listeners - (array) The list of listeners to notify. raw - (boolean) If true, does not call the listener's notify() function. |
public push ( mixed $event, string $type = null, array $flags = [], array $options = [] ) | ||
$event | mixed | Horde_Notification_Event object or message string. |
$type | string | The type of message. |
$flags | array | Array of optional flags that will be passed to the registered listeners. |
$options | array | Additional options:
'immediate' - (boolean) If true, immediately tries to attach to a listener. If no listener exists for this type, the message will be dropped. DEFAULT: false (message will be attached to available handler at the time notify() is called). |
protected bool $_forceAttach | ||
리턴 | boolean |
protected array $_listeners | ||
리턴 | array |