00001 <?php 00002 // 00003 // Definition of eZPublishType class 00004 // 00005 // Created on: <12-May-2003 13:29:25 sp> 00006 // 00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00008 // SOFTWARE NAME: eZ publish 00009 // SOFTWARE RELEASE: 3.9.x 00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 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 ezpublishtype.php 00032 */ 00033 00034 /*! 00035 \class eZPublishType ezpublishtype.php 00036 \brief The class eZPublishType does 00037 00038 */ 00039 define( 'EZ_NOTIFICATIONTYPESTRING_PUBLISH', 'ezpublish' ); 00040 00041 class eZPublishType extends eZNotificationEventType 00042 { 00043 /*! 00044 Constructor 00045 */ 00046 function eZPublishType() 00047 { 00048 $this->eZNotificationEventType( EZ_NOTIFICATIONTYPESTRING_PUBLISH ); 00049 } 00050 00051 function initializeEvent( &$event, $params ) 00052 { 00053 eZDebugSetting::writeDebug( 'kernel-notification', $params, 'params for type' ); 00054 $event->setAttribute( 'data_int1', $params['object'] ); 00055 $event->setAttribute( 'data_int2', $params['version'] ); 00056 } 00057 00058 function eventContent( &$event ) 00059 { 00060 return eZContentObjectVersion::fetchVersion( $event->attribute( 'data_int2' ), $event->attribute( 'data_int1' ) ); 00061 } 00062 } 00063 00064 eZNotificationEventType::register( EZ_NOTIFICATIONTYPESTRING_PUBLISH, 'ezpublishtype' ); 00065 00066 ?>
1.6.3