00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 define( 'EZ_NOTIFICATIONEVENTHANDLER_EVENT_HANDLED', 0 );
00041 define( 'EZ_NOTIFICATIONEVENTHANDLER_EVENT_SKIPPED', 1 );
00042 define( 'EZ_NOTIFICATIONEVENTHANDLER_EVENT_UNKNOWN', 2 );
00043 define( 'EZ_NOTIFICATIONEVENTHANDLER_EVENT_ERROR', 3 );
00044
00045 include_once( 'kernel/classes/notification/eznotificationtransport.php' );
00046
00047 class eZNotificationEventHandler
00048 {
00049
00050
00051
00052 function eZNotificationEventHandler( $idString, $name )
00053 {
00054 $this->IDString = $idString;
00055 $this->Name = $name;
00056 }
00057
00058 function attributes()
00059 {
00060 return array( 'id_string',
00061 'name' );
00062 }
00063
00064 function hasAttribute( $attr )
00065 {
00066 return in_array( $attr, $this->attributes() );
00067 }
00068
00069 function &attribute( $attr )
00070 {
00071 if ( $attr == 'id_string' )
00072 {
00073 return $this->IDString;
00074 }
00075 else if ( $attr == 'name' )
00076 {
00077 return $this->Name;
00078 }
00079 else
00080 {
00081 eZDebug::writeError( "Attribute '$attr' does not exist", 'eZNotificationEventHandler::attribute' );
00082 $retValue = null;
00083 return $retValue;
00084 }
00085 }
00086
00087 function handle( $event )
00088 {
00089 return true;
00090 }
00091
00092
00093
00094
00095 function cleanup()
00096 {
00097 }
00098
00099 function fetchHttpInput( &$http, &$module )
00100 {
00101 return true;
00102 }
00103
00104 function storeSettings( &$http, &$module )
00105 {
00106 return true;
00107 }
00108
00109 var $IDString = false;
00110 var $Name = false;
00111 }
00112
00113 ?>