1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-08 01:14:24 +03:00
ifhub.club/classes/modules/comment/entity/Comment.entity.class.php

167 lines
4.7 KiB
PHP
Raw Normal View History

<?php
2008-09-21 09:36:57 +03:00
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
class ModuleComment_EntityComment extends Entity
2008-09-21 09:36:57 +03:00
{
public function getId() {
return $this->_getDataOne('comment_id');
2008-09-21 09:36:57 +03:00
}
public function getPid() {
return $this->_getDataOne('comment_pid');
2008-09-21 09:36:57 +03:00
}
public function getLeft() {
return $this->_getDataOne('comment_left');
}
public function getRight() {
return $this->_getDataOne('comment_right');
}
2009-06-23 20:06:19 +03:00
public function getTargetId() {
return $this->_getDataOne('target_id');
2009-06-23 20:06:19 +03:00
}
public function getTargetType() {
return $this->_getDataOne('target_type');
2008-09-21 09:36:57 +03:00
}
public function getTargetParentId() {
return $this->_getDataOne('target_parent_id') ? $this->_getDataOne('target_parent_id') : 0;
}
2008-09-21 09:36:57 +03:00
public function getUserId() {
return $this->_getDataOne('user_id');
2008-09-21 09:36:57 +03:00
}
public function getText() {
return $this->_getDataOne('comment_text');
2008-09-21 09:36:57 +03:00
}
public function getDate() {
return $this->_getDataOne('comment_date');
2008-09-21 09:36:57 +03:00
}
public function getUserIp() {
return $this->_getDataOne('comment_user_ip');
2008-09-21 09:36:57 +03:00
}
public function getRating() {
return number_format(round($this->_getDataOne('comment_rating'),2), 0, '.', '');
2008-09-21 09:36:57 +03:00
}
public function getCountVote() {
return $this->_getDataOne('comment_count_vote');
2008-09-21 09:36:57 +03:00
}
public function getDelete() {
return $this->_getDataOne('comment_delete');
}
2009-06-23 20:06:19 +03:00
public function getPublish() {
return $this->_getDataOne('comment_publish') ? 1 : 0;
2009-06-23 20:06:19 +03:00
}
public function getTextHash() {
return $this->_getDataOne('comment_text_hash');
}
2008-09-21 09:36:57 +03:00
2009-06-28 17:04:44 +03:00
2009-06-23 20:06:19 +03:00
public function getLevel() {
return $this->_getDataOne('comment_level');
2009-06-23 20:06:19 +03:00
}
public function isBad() {
if ($this->getRating()<=Config::Get('module.comment.bad')) {
return true;
}
return false;
2008-09-21 09:36:57 +03:00
}
2009-06-23 20:06:19 +03:00
public function getUser() {
return $this->_getDataOne('user');
2009-06-23 20:06:19 +03:00
}
public function getTarget() {
return $this->_getDataOne('target');
2009-06-23 20:06:19 +03:00
}
public function getVote() {
return $this->_getDataOne('vote');
2009-06-23 20:06:19 +03:00
}
public function getIsFavourite() {
return $this->_getDataOne('comment_is_favourite');
}
public function getCountFavourite() {
return $this->_getDataOne('comment_count_favourite');
}
2008-09-21 09:36:57 +03:00
public function setId($data) {
$this->_aData['comment_id']=$data;
}
public function setPid($data) {
$this->_aData['comment_pid']=$data;
}
public function setLeft($data) {
$this->_aData['comment_left']=$data;
}
public function setRight($data) {
$this->_aData['comment_right']=$data;
}
2009-06-23 20:06:19 +03:00
public function setTargetId($data) {
$this->_aData['target_id']=$data;
}
public function setTargetType($data) {
$this->_aData['target_type']=$data;
2008-09-21 09:36:57 +03:00
}
public function setTargetParentId($data) {
$this->_aData['target_parent_id']=$data;
}
2008-09-21 09:36:57 +03:00
public function setUserId($data) {
$this->_aData['user_id']=$data;
}
public function setText($data) {
$this->_aData['comment_text']=$data;
}
public function setDate($data) {
$this->_aData['comment_date']=$data;
}
public function setUserIp($data) {
$this->_aData['comment_user_ip']=$data;
}
public function setRating($data) {
$this->_aData['comment_rating']=$data;
}
public function setCountVote($data) {
$this->_aData['comment_count_vote']=$data;
}
public function setDelete($data) {
$this->_aData['comment_delete']=$data;
2009-06-23 20:06:19 +03:00
}
public function setPublish($data) {
$this->_aData['comment_publish']=$data;
}
public function setTextHash($data) {
$this->_aData['comment_text_hash']=$data;
}
2009-06-23 20:06:19 +03:00
public function setLevel($data) {
$this->_aData['comment_level']=$data;
2009-06-23 20:06:19 +03:00
}
public function setUser($data) {
$this->_aData['user']=$data;
}
public function setTarget($data) {
$this->_aData['target']=$data;
}
public function setVote($data) {
$this->_aData['vote']=$data;
}
public function setIsFavourite($data) {
$this->_aData['comment_is_favourite']=$data;
}
public function setCountFavourite($data) {
$this->_aData['comment_count_favourite']=$data;
}
2008-09-21 09:36:57 +03:00
}
?>