<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

class guest_post_entity extends Entity
{
	public function __construct($data=null)
	{
		$this->_data['id']=&$this->_data['msg_id'];
		if ($data) $this->set($data);
	}

	public function __set($k, $v)
	{
		parent::__set($k, $v);
		if ($k=='user') {
			$this->_data['user_id']=$this->_data['user']->id;
		}
	}
}