|
eZ Publish
[trunk]
|
00001 <?php 00002 /** 00003 * File containing the eZNotificationEventHandler class. 00004 * 00005 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved. 00006 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 00007 * @version //autogentag// 00008 * @package kernel 00009 */ 00010 00011 /*! 00012 \class eZNotificationEventHandler eznotificationeventhandler.php 00013 \brief The class eZNotificationEventHandler does 00014 00015 */ 00016 00017 class eZNotificationEventHandler 00018 { 00019 const EVENT_HANDLED = 0; 00020 const EVENT_SKIPPED = 1; 00021 const EVENT_UNKNOWN = 2; 00022 const EVENT_ERROR = 3; 00023 00024 /*! 00025 Constructor 00026 */ 00027 function eZNotificationEventHandler( $idString, $name ) 00028 { 00029 $this->IDString = $idString; 00030 $this->Name = $name; 00031 } 00032 00033 function attributes() 00034 { 00035 return array( 'id_string', 00036 'name' ); 00037 } 00038 00039 function hasAttribute( $attr ) 00040 { 00041 return in_array( $attr, $this->attributes() ); 00042 } 00043 00044 function attribute( $attr ) 00045 { 00046 if ( $attr == 'id_string' ) 00047 { 00048 return $this->IDString; 00049 } 00050 else if ( $attr == 'name' ) 00051 { 00052 return $this->Name; 00053 } 00054 00055 eZDebug::writeError( "Attribute '$attr' does not exist", __METHOD__ ); 00056 return null; 00057 } 00058 00059 function handle( $event ) 00060 { 00061 return true; 00062 } 00063 00064 /*! 00065 Cleanup any specific tables or other resources. 00066 */ 00067 function cleanup() 00068 { 00069 } 00070 00071 function fetchHttpInput( $http, $module ) 00072 { 00073 return true; 00074 } 00075 00076 function storeSettings( $http, $module ) 00077 { 00078 return true; 00079 } 00080 00081 public $IDString = false; 00082 public $Name = false; 00083 } 00084 00085 ?>