1: <?php
2:
3: /**
4: * This file contains the cHTMLTime class.
5: *
6: * @package Core
7: * @subpackage GUI_HTML
8: * @author Simon Sprankel
9: * @copyright four for business AG <www.4fb.de>
10: * @license http://www.contenido.org/license/LIZENZ.txt
11: * @link http://www.4fb.de
12: * @link http://www.contenido.org
13: */
14:
15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
16:
17: /**
18: * cHTMLTime class represents a date/time.
19: *
20: * @package Core
21: * @subpackage GUI_HTML
22: */
23: class cHTMLTime extends cHTMLContentElement {
24:
25: /**
26: * Constructor to create an instance of this class.
27: *
28: * @param mixed $content [optional]
29: * String or object with the contents
30: * @param string $class [optional]
31: * the class of this element
32: * @param string $id [optional]
33: * the ID of this element
34: * @param string $datetime [optional]
35: */
36: public function __construct($content = '', $class = '', $id = '', $datetime = '') {
37: parent::__construct($content, $class, $id);
38: $this->_tag = 'time';
39: $this->setDatetime($datetime);
40: }
41:
42: /**
43: * Sets the datetime attribute of this element.
44: *
45: * @param string $datetime
46: */
47: public function setDatetime($datetime) {
48: $this->setAttribute('datetime', $datetime);
49: }
50:
51: }
52: