params = $params; } public function set_content($content) { $this->content = $content; } public function set_name($name) { $this->name = $name; } public function render_edit() { $input_dom = new DOM("input"); $input_dom->setAttribute("type", "text"); $input_dom->setAttribute("name", $this->name); $input_dom->setAttribute("value", $this->content); $input_dom->view(); } public function render_value() { return date("H:m:s d.m.Y", $this->content); } public function render_db_value() { if(!$this->content) return time(); return $this->content; } }