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-2016 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 * @category Kolab 24 * @package Kolab_Format 25 * @author Gunnar Wrobel <wrobel@pardus.de> 26 * @license http://www.horde.org/licenses/lgpl21 LGPL 27 * @link http://www.horde.org/libraries/Horde_Kolab_Format 28 */ 29class Horde_Kolab_Format_Xml_Type_ModificationDate 30extends Horde_Kolab_Format_Xml_Type_AutomaticDate 31{ 32 /** 33 * Generate the value that should be written to the node. Override in the 34 * extending classes. 35 * 36 * @param string $name The name of the the attribute 37 * to be updated. 38 * @param array $attributes The data array that holds all 39 * attribute values. 40 * @param array $params The parameters for this write operation. 41 * 42 * @return mixed The value to be written. 43 */ 44 protected function generateWriteValue($name, $attributes, $params) 45 { 46 return Horde_Kolab_Format_Date::writeUtcDateTime( 47 new DateTime('now', new DateTimeZone('UTC')) 48 ); 49 } 50} 51