[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZCurrentTimeType class 4 // 5 // Created on: <16-May-2003 10:11:48 sp> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezcurrenttimetype.php 30 */ 31 32 /*! 33 \class eZCurrentTimeType ezcurrenttimetype.php 34 \brief The class eZCurrentTimeType does 35 36 */ 37 include_once ( 'kernel/classes/notification/eznotificationeventtype.php' ); 38 include_once ( "lib/ezlocale/classes/ezdate.php" ); 39 40 define( 'EZ_NOTIFICATIONTYPESTRING_CURRENTTIME', 'ezcurrenttime' ); 41 42 class eZCurrentTimeType extends eZNotificationEventType 43 { 44 /*! 45 Constructor 46 */ 47 function eZCurrentTimeType() 48 { 49 $this->eZNotificationEventType( EZ_NOTIFICATIONTYPESTRING_CURRENTTIME ); 50 } 51 52 function initializeEvent( &$event, $params ) 53 { 54 eZDebugSetting::writeDebug( 'kernel-notification', $params, 'params for type' ); 55 $time = 0; 56 if ( array_key_exists( 'time', $params ) ) 57 { 58 $time = $params['time']; 59 } 60 else 61 { 62 $time = mktime(); 63 } 64 $event->setAttribute( 'data_int1', $time ); 65 } 66 67 function &eventContent( &$event ) 68 { 69 $date = new eZDate( ); 70 $stamp = $event->attribute( 'data_int1' ); 71 $date->setTimeStamp( $stamp ); 72 return $date; 73 } 74 75 } 76 77 eZNotificationEventType::register( EZ_NOTIFICATIONTYPESTRING_CURRENTTIME, 'ezcurrenttimetype' ); 78 79 80 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |