Moved the core part from Horde_Notification into different
authorGunnar Wrobel <p@rdus.de>
Wed, 28 Oct 2009 11:29:22 +0000 (12:29 +0100)
committerGunnar Wrobel <p@rdus.de>
Wed, 28 Oct 2009 11:29:22 +0000 (12:29 +0100)
commit3b590095a4312f85639071510adc42d5dc9090fc
treec0a54ece74dab0a77a8030985e42dd439559ad9f
parent7ee14724b0dcdb39d2d8b66d2b57942f88ab251d
Moved the core part from Horde_Notification into different
Horde_Notification_Handler classes. Added unit testing.

The core part of the functionality went into
Horde_Notification_Handler_Base. Only the segments that require access
to Horde global state have been split off into separate decorators.

The Horde_Notification_Handler_Alarm decorator delegates alarms to the
alarm system provided in the constructor. It needs access to
Horde_Auth::getAuth().

The Horde_Notification_Handler_Hordelog decorator logs error events
via Horde::logMessage().

As the logging part is useful but should be independant of Horde
global state if possible the Horde_Notification_Handler_Logged
decorator has been added. It allows providing a logger in the
constructor.
12 files changed:
framework/Notification/lib/Horde/Notification.php
framework/Notification/lib/Horde/Notification/Handler.php [new file with mode: 0644]
framework/Notification/lib/Horde/Notification/Handler/Alarm.php [new file with mode: 0644]
framework/Notification/lib/Horde/Notification/Handler/Base.php [new file with mode: 0644]
framework/Notification/lib/Horde/Notification/Handler/Hordelog.php [new file with mode: 0644]
framework/Notification/lib/Horde/Notification/Handler/Logged.php [new file with mode: 0644]
framework/Notification/package.xml
framework/Notification/test/Horde/Notification/Class/Notification/Handler/AlarmTest.php [new file with mode: 0644]
framework/Notification/test/Horde/Notification/Class/Notification/Handler/BaseTest.php [new file with mode: 0644]
framework/Notification/test/Horde/Notification/Class/Notification/Handler/HordelogTest.php [new file with mode: 0644]
framework/Notification/test/Horde/Notification/Class/Notification/Handler/LoggedTest.php [new file with mode: 0644]
framework/Notification/test/Horde/Notification/Class/NotificationTest.php