Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezcurrenttimetype.php
Go to the documentation of this file.
1 <?php
16 class eZCurrentTimeType extends eZNotificationEventType
17 {
18 const NOTIFICATION_TYPE_STRING = 'ezcurrenttime';
19
20 public function __construct()
21 {
22 parent::__construct( self::NOTIFICATION_TYPE_STRING );
23 }
24
25 function initializeEvent( $event, $params )
26 {
27 eZDebugSetting::writeDebug( 'kernel-notification', $params, 'params for type' );
28 $time = 0;
29 if ( array_key_exists( 'time', $params ) )
30 {
31 $time = $params['time'];
32 }
33 else
34 {
35 $time = time();
36 }
37 $event->setAttribute( 'data_int1', $time );
38 }
39
40 function eventContent( $event )
41 {
42 $date = new eZDate( );
43 $stamp = $event->attribute( 'data_int1' );
44 $date->setTimeStamp( $stamp );
45 return $date;
46 }
47
48 }
49
50 eZNotificationEventType::register( eZCurrentTimeType::NOTIFICATION_TYPE_STRING, 'eZCurrentTimeType' );
51
52
53 ?>
eZCurrentTimeType
The class eZCurrentTimeType does.
Definition: ezcurrenttimetype.php:17
eZCurrentTimeType\eventContent
eventContent( $event)
Definition: ezcurrenttimetype.php:40
eZCurrentTimeType\__construct
__construct()
Definition: ezcurrenttimetype.php:20
eZCurrentTimeType\initializeEvent
initializeEvent( $event, $params)
Definition: ezcurrenttimetype.php:25
eZCurrentTimeType\NOTIFICATION_TYPE_STRING
const NOTIFICATION_TYPE_STRING
Definition: ezcurrenttimetype.php:18
eZDate
Locale aware date handler.
Definition: ezdate.php:58
eZDebugSetting\writeDebug
static writeDebug( $conditionName, $string, $label="")
Definition: ezdebugsetting.php:127
eZNotificationEventType
The class eZNotificationEventType does.
Definition: eznotificationeventtype.php:18
eZNotificationEventType\register
static register( $notificationTypeString, $className)
Definition: eznotificationeventtype.php:166
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.