From 8f39f7ba1947693696174bea03cdbc095d149953 Mon Sep 17 00:00:00 2001
From: Gunnar Wrobel
Date: Wed, 4 Nov 2009 23:47:10 +0100
Subject: [PATCH] Clarify that these are interfaces by renaming them to
Interface.php.
---
framework/Notification/lib/Horde/Notification/Handler/Alarm.php | 4 ++--
framework/Notification/lib/Horde/Notification/Handler/Base.php | 8 +++++---
.../Notification/lib/Horde/Notification/Handler/Hordelog.php | 7 ++++---
.../lib/Horde/Notification/{Handler.php => Handler/Interface.php} | 2 +-
framework/Notification/lib/Horde/Notification/Handler/Logged.php | 8 +++++---
.../lib/Horde/Notification/{Storage.php => Storage/Interface.php} | 2 +-
framework/Notification/lib/Horde/Notification/Storage/Session.php | 3 ++-
framework/Notification/package.xml | 8 ++++----
8 files changed, 24 insertions(+), 18 deletions(-)
rename framework/Notification/lib/Horde/Notification/{Handler.php => Handler/Interface.php} (98%)
rename framework/Notification/lib/Horde/Notification/{Storage.php => Storage/Interface.php} (94%)
diff --git a/framework/Notification/lib/Horde/Notification/Handler/Alarm.php b/framework/Notification/lib/Horde/Notification/Handler/Alarm.php
index 13ba61f55..4b4e43de2 100644
--- a/framework/Notification/lib/Horde/Notification/Handler/Alarm.php
+++ b/framework/Notification/lib/Horde/Notification/Handler/Alarm.php
@@ -11,7 +11,7 @@
* @package Horde_Notification
*/
class Horde_Notification_Handler_Alarm
-implements Horde_Notification_Handler
+implements Horde_Notification_Handler_Interface
{
/**
* The notification handler decorated by this instance.
@@ -36,7 +36,7 @@ implements Horde_Notification_Handler
* @param Horde_Alarm $alarm The alarm system to notify.
*/
public function __construct(
- Horde_Notification_Handler $handler,
+ Horde_Notification_Handler_Interface $handler,
Horde_Alarm $alarm
) {
$this->_handler = $handler;
diff --git a/framework/Notification/lib/Horde/Notification/Handler/Base.php b/framework/Notification/lib/Horde/Notification/Handler/Base.php
index daf472be1..8d6766942 100644
--- a/framework/Notification/lib/Horde/Notification/Handler/Base.php
+++ b/framework/Notification/lib/Horde/Notification/Handler/Base.php
@@ -12,7 +12,8 @@
* @author Jan Schneider
* @package Horde_Notification
*/
-class Horde_Notification_Handler_Base implements Horde_Notification_Handler
+class Horde_Notification_Handler_Base
+implements Horde_Notification_Handler_Interface
{
/**
* Hash containing all attached listener objects.
@@ -41,8 +42,9 @@ class Horde_Notification_Handler_Base implements Horde_Notification_Handler
*
* @param Horde_Notification_Storage $storage The storage location to use.
*/
- public function __construct(Horde_Notification_Storage $storage)
- {
+ public function __construct(
+ Horde_Notification_Storage_Interface $storage
+ ) {
$this->_storage = $storage;
}
diff --git a/framework/Notification/lib/Horde/Notification/Handler/Hordelog.php b/framework/Notification/lib/Horde/Notification/Handler/Hordelog.php
index 5dbdb76ce..5558f472e 100644
--- a/framework/Notification/lib/Horde/Notification/Handler/Hordelog.php
+++ b/framework/Notification/lib/Horde/Notification/Handler/Hordelog.php
@@ -12,7 +12,7 @@
* @package Horde_Notification
*/
class Horde_Notification_Handler_Hordelog
-implements Horde_Notification_Handler
+implements Horde_Notification_Handler_Interface
{
/**
* The notification handler decorated by this instance.
@@ -28,8 +28,9 @@ implements Horde_Notification_Handler
* @param Horde_Notification_Handler $handler The handler this instance
* provides with logging.
*/
- public function __construct(Horde_Notification_Handler $handler)
- {
+ public function __construct(
+ Horde_Notification_Handler_Interface $handler
+ ) {
$this->_handler = $handler;
}
diff --git a/framework/Notification/lib/Horde/Notification/Handler.php b/framework/Notification/lib/Horde/Notification/Handler/Interface.php
similarity index 98%
rename from framework/Notification/lib/Horde/Notification/Handler.php
rename to framework/Notification/lib/Horde/Notification/Handler/Interface.php
index b29e4e10a..c321284b2 100644
--- a/framework/Notification/lib/Horde/Notification/Handler.php
+++ b/framework/Notification/lib/Horde/Notification/Handler/Interface.php
@@ -11,7 +11,7 @@
* @author Jan Schneider
* @package Horde_Notification
*/
-interface Horde_Notification_Handler
+interface Horde_Notification_Handler_Interface
{
/**
* Registers a listener with the notification object and includes
diff --git a/framework/Notification/lib/Horde/Notification/Handler/Logged.php b/framework/Notification/lib/Horde/Notification/Handler/Logged.php
index 63d20d67e..fbf3e1070 100644
--- a/framework/Notification/lib/Horde/Notification/Handler/Logged.php
+++ b/framework/Notification/lib/Horde/Notification/Handler/Logged.php
@@ -12,7 +12,7 @@
* @package Horde_Notification
*/
class Horde_Notification_Handler_Logged
-implements Horde_Notification_Handler
+implements Horde_Notification_Handler_Interface
{
/**
* The notification handler decorated by this instance.
@@ -42,8 +42,10 @@ implements Horde_Notification_Handler
* common Logger here (PEAR Log,
* Horde_Log_Logger, or Zend_Log).
*/
- public function __construct(Horde_Notification_Handler $handler, $logger)
- {
+ public function __construct(
+ Horde_Notification_Handler_Interface $handler,
+ $logger
+ ) {
$this->_handler = $handler;
$this->_logger = $logger;
}
diff --git a/framework/Notification/lib/Horde/Notification/Storage.php b/framework/Notification/lib/Horde/Notification/Storage/Interface.php
similarity index 94%
rename from framework/Notification/lib/Horde/Notification/Storage.php
rename to framework/Notification/lib/Horde/Notification/Storage/Interface.php
index ca35e7a9b..f6382d633 100644
--- a/framework/Notification/lib/Horde/Notification/Storage.php
+++ b/framework/Notification/lib/Horde/Notification/Storage/Interface.php
@@ -25,7 +25,7 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
* @link http://pear.horde.org/index.php?package=Notification
*/
-interface Horde_Notification_Storage extends ArrayAccess
+interface Horde_Notification_Storage_Interface extends ArrayAccess
{
/**
* Store a new event.
diff --git a/framework/Notification/lib/Horde/Notification/Storage/Session.php b/framework/Notification/lib/Horde/Notification/Storage/Session.php
index 0232fcb28..45c52b738 100644
--- a/framework/Notification/lib/Horde/Notification/Storage/Session.php
+++ b/framework/Notification/lib/Horde/Notification/Storage/Session.php
@@ -25,7 +25,8 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
* @link http://pear.horde.org/index.php?package=Notification
*/
-class Horde_Notification_Storage_Session implements Horde_Notification_Storage
+class Horde_Notification_Storage_Session
+implements Horde_Notification_Storage_Interface
{
/**
* The stack name.
diff --git a/framework/Notification/package.xml b/framework/Notification/package.xml
index d80e2b688..c02fd825d 100644
--- a/framework/Notification/package.xml
+++ b/framework/Notification/package.xml
@@ -33,11 +33,11 @@ http://pear.php.net/dtd/package-2.0.xsd">
-
+
@@ -48,8 +48,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
-
+
@@ -115,10 +115,10 @@ http://pear.php.net/dtd/package-2.0.xsd">
-
+
@@ -126,7 +126,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
-
+
--
2.11.0