All pastes #14403 Raw Edit

Paste (entity)

public php v1 · immutable
#14403 ·published 2005-06-13 23:12 UTC
rendered paste body
<?php/* * PHPasteBin - A PasteBin written in PHP * Copyright (C) 2005 Jeroen Budts * * 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. *//** * PHPasteBin - A PasteBin written in PHP. * * @author Jeroen Budts * @copyright copyright (c) 2005 Jeroen Budts * @license http://opensource.org/licenses/gpl-license.php GNU Public License * * @package be_lightyear_phpastebin * @subpackage entities */using("entities.BaseEntity");/** * A class representing one single paste. * * @package be_lightyear_phpastebin * @subpackage entities */class Paste extends BaseEntity {	/**	 * The name of the paste.	 * @var string the name	 * @access private	 */	var $_name;	/**	 * The description of the paste.	 * @var string the description	 * @access private	 */	var $_description;	/**	 * The user that created this paste.	 * @var User the owner of the paste	 * @access private	 */	var $_ownerId = -1;	/**	 * The highlighter used for this paste.	 * @var Highlighter highlighter	 * @access private	 */	var $_highlight;	/**	 * The content of the paste.	 * @var string the content	 * @access private	 */	var $_content;	/**	 * Is the paste public or private?	 * @var boolean is it public?	 * @access private	 */	var $_public = 1;	/**	 * The id of the parent paste, if one.	 * @var int id of the parent	 * @access private	 */	var $_parentId;	/**	 * The timestamp on which the paste was created.	 * @var Date timestamp	 * @access private	 */	var $_timestamp;	/**	 * Timestamp on which the paste expires and may be deleted.	 * @var Date expire timestamp	 * @access private	 */	var $_expiration;	/**	 * Returns the persistency info for this entity.	 * @return array the persistency info	 * @static	 * @see BaseEntity::getPersistencyInfo()	 */	function getPersistencyInfo() {		return array(			'table_name'	=> 'paste',			'fields'		=>				array(					array(	'table_field' 	=> 'user_id',							'property_name'	=> 'OwnerId'),					array(	'table_field'	=> 'username',							'property_name'	=> 'Username'),					array(	'table_field'	=> 'name',							'property_name'	=> 'Name'),					array(	'table_field'	=> 'description',							'property_name'	=> 'Description'),					array(	'table_field'	=> 'content',							'property_name'	=> 'Content'),					array(	'table_field'	=> 'public',							'property_name'	=> 'Public'),					array(	'table_field'	=> 'parent_id',							'property_name'	=> 'ParentId'),					array(	'table_field'	=> 'creation_stamp',							'property_name'	=> 'Timestamp'),					array(	'table_field'	=> 'expiration_stamp',							'property_name'	=> 'Expiration')				)			);	}	/**	 * @see $_name	 */	function getName() {		return $this->_name;	}	/**	 * @see $_name	 */	function setName($name) {		$this->_name = $name;	}	/**	 * @see $_description	 */	function getDescription() {		return $this->_description;	}	/**	 * @see $_description	 */	function setDescription($description) {		$this->_description = $description;	}	/**	 * @see $_ownerId	 */	function getOwnerId() {		return $this->_ownerId;	}	/**	 * @see $_ownerId	 */	function setOwnerId($ownerId) {		$this->_ownerId = $ownerId;	}	/**	 * @see $_highlight	 */	function getHighlighter() {		return $this->_highlight;	}	/**	 * @see $_highlight	 */	function setHighlighter($highlighter) {		$this->_highlight = $highlighter;	}	/**	 * @see $_content	 */	function getContent() {		return $this->_content;	}	/**	 * @see $_content	 */	function setContent($content) {		$this->_content = $content;	}	/**	 * @see $_public	 */	function isPublic() {		return $this->_public;	}	/**	 * Alias for isPublic(), to be used by the persistancy framework.	 * @see Paste->isPublic()	 */	function getPublic() {		return $this->isPublic();	}	/**	 * @see $_public	 */	function setPublic($public) {		$this->_public = $public;	}	/**	 * @see $_parentId	 */	function getParentId() {		return $this->_parentId;	}	/**	 * @see $_parentId	 */	function setParentId($parentId) {		$this->_parentId = $parentId;	}	/**	 * @see $_timestamp	 */	function getTimestamp() {		return $this->_timestamp;	}	/**	 * @see $_timestamp	 */	function setTimestamp($timestamp) {		$this->_timestamp = $timestamp;	}	/**	 * @see $_expiration	 */	function getExpiration() {		return $this->_expiration;	}	/**	 * @see $_expiration	 */	function setExpiration($expiration) {		$this->_expiration = $expiration;	}}/*_____edit rules_____________________________________________________http://jedit.org:mode=php:tabSize=4:indentSize=4:noTabs=false:encoding=UTF-8:wrap=none:folding=java:*/?>