1: <?php
2: /**
3: * Handles the modification date attribute.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Format
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL
11: * @link http://www.horde.org/libraries/Horde_Kolab_Format
12: */
13:
14: /**
15: * Handles the modification date attribute.
16: *
17: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you did not
20: * receive this file, see
21: * http://www.horde.org/licenses/lgpl21.
22: *
23: * @since Horde_Kolab_Format 1.1.0
24: *
25: * @category Kolab
26: * @package Kolab_Format
27: * @author Gunnar Wrobel <wrobel@pardus.de>
28: * @license http://www.horde.org/licenses/lgpl21 LGPL
29: * @link http://www.horde.org/libraries/Horde_Kolab_Format
30: */
31: class Horde_Kolab_Format_Xml_Type_ModificationDate
32: extends Horde_Kolab_Format_Xml_Type_AutomaticDate
33: {
34: /**
35: * Generate the value that should be written to the node. Override in the
36: * extending classes.
37: *
38: * @param string $name The name of the the attribute
39: * to be updated.
40: * @param array $attributes The data array that holds all
41: * attribute values.
42: * @param array $params The parameters for this write operation.
43: *
44: * @return mixed The value to be written.
45: */
46: protected function generateWriteValue($name, $attributes, $params)
47: {
48: return Horde_Kolab_Format_Date::writeUtcDateTime(
49: new DateTime('now', new DateTimeZone('UTC'))
50: );
51: }
52: }
53: