/** * Class constructor * * @access public * @param integer [$id] Element id */ public function __construct($id) { if (empty($id)) { throw new Exception('Element id missing'); } parent::__construct(); $this->_id = $id; $this->get_content(); $this->_comment = new Comment(); if (VSession::visitor_name(false) && VSession::visitor_email(false)) { $this->_comment->_name = VSession::visitor_name(); $this->_comment->_email = VSession::visitor_email(); } $this->question(); if (VGet::respond_to()) { $this->_comment->_content = '@' . VGet::respond_to(); } if (VPost::submit_comment(false)) { $this->create(); } }