From: Ben Klang Date: Mon, 4 Oct 2010 18:39:15 +0000 (-0400) Subject: Rebuild factory for Horde_Notification X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8093932637eef9fdbb299b76c8d3057536eb8001;p=horde.git Rebuild factory for Horde_Notification Still need to so something different with the singleton method I think. Does it really belong in the class? --- diff --git a/framework/Core/lib/Horde/Core/Binder/Notification.php b/framework/Core/lib/Horde/Core/Binder/Notification.php deleted file mode 100644 index 1608431ba..000000000 --- a/framework/Core/lib/Horde/Core/Binder/Notification.php +++ /dev/null @@ -1,26 +0,0 @@ -addType('default', '*', 'Horde_Core_Notification_Status'); - $notify->addType('status', 'horde.*', 'Horde_Core_Notification_Status'); - - $notify->addDecorator(new Horde_Notification_Handler_Decorator_Alarm($injector->getInstance('Horde_Alarm'), $GLOBALS['registry']->getAuth())); - $notify->addDecorator(new Horde_Core_Notification_Hordelog()); - - return $notify; - } - - public function equals(Horde_Injector_Binder $binder) - { - return false; - } - -} diff --git a/framework/Core/lib/Horde/Core/Factory/Notification.php b/framework/Core/lib/Horde/Core/Factory/Notification.php new file mode 100644 index 000000000..1295f6cbd --- /dev/null +++ b/framework/Core/lib/Horde/Core/Factory/Notification.php @@ -0,0 +1,20 @@ +addType('default', '*', 'Horde_Core_Notification_Status'); + $notify->addType('status', 'horde.*', 'Horde_Core_Notification_Status'); + + $notify->addDecorator(new Horde_Notification_Handler_Decorator_Alarm($injector->getInstance('Horde_Alarm'), $GLOBALS['registry']->getAuth())); + $notify->addDecorator(new Horde_Core_Notification_Hordelog()); + + return $notify; + } +} diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 2a010cff3..baa334f6c 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -277,7 +277,6 @@ class Horde_Registry 'Horde_LoginTasks' => new Horde_Core_Binder_LoginTasks(), 'Horde_Mail' => new Horde_Core_Binder_Mail(), 'Horde_Mime_Viewer' => new Horde_Core_Binder_MimeViewer(), - 'Horde_Notification' => new Horde_Core_Binder_Notification(), 'Horde_Prefs_Identity' => new Horde_Core_Binder_Identity(), 'Horde_Share_Factory' => new Horde_Core_Binder_ShareFactory(), 'Horde_Template' => new Horde_Core_Binder_Template(), @@ -333,6 +332,10 @@ class Horde_Registry 'Horde_Core_Factory_Memcache', 'create', ), + 'Horde_Notification' => array( + 'Horde_Core_Factory_Notification', + 'create', + ), 'Horde_Perms' => array( 'Horde_Core_Factory_Perms', 'create', diff --git a/framework/Core/package.xml b/framework/Core/package.xml index 35fd3217b..eb54fc9ad 100644 --- a/framework/Core/package.xml +++ b/framework/Core/package.xml @@ -23,8 +23,8 @@ Application Framework. slusarz@horde.org yes - 2010-10-03 - + 2010-10-04 + 0.1.0 0.1.0 @@ -127,7 +127,6 @@ Application Framework. - @@ -164,6 +163,7 @@ Application Framework. + @@ -446,7 +446,6 @@ Application Framework. - @@ -479,6 +478,7 @@ Application Framework. + @@ -575,7 +575,7 @@ Initial packaging beta beta - 2010-10-03 + 2010-10-04 LGPL * Add Horde::addInlineJsVars().