eZ Publish  [4.0]
eznotificationeventhandler.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // Definition of eZNotificationEventHandler class
00004 //
00005 // Created on: <09-May-2003 16:06:26 sp>
00006 //
00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00008 // SOFTWARE NAME: eZ Publish
00009 // SOFTWARE RELEASE: 4.0.x
00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS
00011 // SOFTWARE LICENSE: GNU General Public License v2.0
00012 // NOTICE: >
00013 //   This program is free software; you can redistribute it and/or
00014 //   modify it under the terms of version 2.0  of the GNU General
00015 //   Public License as published by the Free Software Foundation.
00016 //
00017 //   This program is distributed in the hope that it will be useful,
00018 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //   GNU General Public License for more details.
00021 //
00022 //   You should have received a copy of version 2.0 of the GNU General
00023 //   Public License along with this program; if not, write to the Free
00024 //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00025 //   MA 02110-1301, USA.
00026 //
00027 //
00028 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00029 //
00030 
00031 /*! \file eznotificationeventhandler.php
00032 */
00033 
00034 /*!
00035   \class eZNotificationEventHandler eznotificationeventhandler.php
00036   \brief The class eZNotificationEventHandler does
00037 
00038 */
00039 
00040 //include_once( 'kernel/classes/notification/eznotificationtransport.php' );
00041 
00042 class eZNotificationEventHandler
00043 {
00044     const EVENT_HANDLED = 0;
00045     const EVENT_SKIPPED = 1;
00046     const EVENT_UNKNOWN = 2;
00047     const EVENT_ERROR = 3;
00048 
00049     /*!
00050      Constructor
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 
00080         eZDebug::writeError( "Attribute '$attr' does not exist", 'eZNotificationEventHandler::attribute' );
00081         return null;
00082     }
00083 
00084     function handle( $event )
00085     {
00086         return true;
00087     }
00088 
00089     /*!
00090      Cleanup any specific tables or other resources.
00091     */
00092     function cleanup()
00093     {
00094     }
00095 
00096     function fetchHttpInput( $http, $module )
00097     {
00098         return true;
00099     }
00100 
00101     function storeSettings( $http, $module )
00102     {
00103         return true;
00104     }
00105 
00106     public $IDString = false;
00107     public $Name = false;
00108 }
00109 
00110 ?>