This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AbetoArmarios_Web/Source/gallery2/modules/comment/classes/GalleryComment.class

206 lines
4.7 KiB
Plaintext
Raw Permalink Normal View History

<?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2007 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
GalleryCoreApi::requireOnce('modules/core/classes/GalleryChildEntity.class');
/**
* A GalleryEntity for comments.
* GalleryComments are basically just structured text objects.
*
* @g2 <class-name>GalleryComment</class-name>
* @g2 <parent-class-name>GalleryChildEntity</parent-class-name>
* @g2 <schema>
* @g2 <schema-major>1</schema-major>
* @g2 <schema-minor>2</schema-minor>
* @g2 </schema>
* @g2 <requires-id/>
*
* @package Comment
* @subpackage Classes
* @author Bharat Mediratta <bharat@menalto.com>
* @version $Revision: 15534 $
*/
class GalleryComment extends GalleryChildEntity {
/**
* Id of the commenter
*
* @g2 <member>
* @g2 <member-name>commenterId</member-name>
* @g2 <member-type>INTEGER</member-type>
* @g2 <member-size>LARGE</member-size>
* @g2 <required/>
* @g2 </member>
*
* @var int $commenterId
* @access public
*/
var $commenterId;
/**
* Commenter's host name or address
*
* @g2 <member>
* @g2 <member-name>host</member-name>
* @g2 <member-type>STRING</member-type>
* @g2 <member-size>MEDIUM</member-size>
* @g2 <required/>
* @g2 </member>
*
* @var string $host
* @access public
*/
var $host;
/**
* Subject of the comment
*
* @g2 <member>
* @g2 <member-name>subject</member-name>
* @g2 <member-type>STRING</member-type>
* @g2 <member-size>MEDIUM</member-size>
* @g2 <member-external-access>FULL</member-external-access>
* @g2 </member>
*
* @var string $subject
* @access public
*/
var $subject;
/**
* Text of the comment
*
* @g2 <member>
* @g2 <member-name>comment</member-name>
* @g2 <member-type>TEXT</member-type>
* @g2 <member-size>SMALL</member-size>
* @g2 <member-external-access>FULL</member-external-access>
* @g2 </member>
*
* @var string $comment
* @access public
*/
var $comment;
/**
* Date of the comment
*
* @g2 <member>
* @g2 <member-name>date</member-name>
* @g2 <member-type>INTEGER</member-type>
* @g2 <indexed/>
* @g2 <required/>
* @g2 <member-external-access>READ</member-external-access>
* @g2 </member>
*
* @var int $date
* @access public
*/
var $date;
/**
* Author of the comment. Only used for guest comments.
*
* @g2 <member>
* @g2 <member-name>author</member-name>
* @g2 <member-type>STRING</member-type>
* @g2 <member-size>MEDIUM</member-size>
* @g2 <member-external-access>FULL</member-external-access>
* @g2 </member>
*
* @var string $author
* @access public
*/
var $author;
/**
* @see GalleryEntity::getClassName
*/
function getClassName() {
return 'GalleryComment';
}
/**
* @see GalleryEntity::create
*/
function create($parentId) {
$ret = parent::create($parentId);
if ($ret) {
return $ret;
}
$this->setCommenterId(null);
$this->setHost(null);
$this->setSubject(null);
$this->setComment(null);
$this->setDate(null);
$this->setAuthor(null);
}
function getCommenterId() {
return $this->commenterId;
}
function setCommenterId($commenterId) {
$this->commenterId = $commenterId;
}
function getHost() {
return $this->host;
}
function setHost($host) {
$this->host = $host;
}
function getSubject() {
return $this->subject;
}
function setSubject($subject) {
$this->subject = $subject;
}
function getComment() {
return $this->comment;
}
function setComment($comment) {
$this->comment = $comment;
}
function getDate() {
return $this->date;
}
function setDate($date) {
$this->date = $date;
}
function setAuthor($author) {
$this->author = $author;
}
function getAuthor() {
return $this->author;
}
}
?>