Location: PHPKode > scripts > Lightweight Club Calendar > lc-calendar-0.9.4/core/lcc_message.class.php
<?php
/**
* Classfile for LCC-Message
*
* PHP Version 4
*
* @author <hide@address.com>
* @copyright Copyright (c) 2006, Benedikt Hallinger
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, 51 Franklin St, Fifth Floor,
* Boston, MA  02110-1301  USA
*/

/**
* This class is a "Message" which is used for errors and informations
*
* The message object is passed to the lcc-view and can be displayed.
*/
class LCC_Message {
	/**
	* Store for the messages text
	*
	* @var string
	* @access private
	*/
	var $_message = '';
	
	/**
	* Store for the messages type
	*
	* @var string
	* @access private
	*/
	var $_type = '';
	
	/**
	* Constructor: initiate message
	*
	* The message supports a "type" field, which you can use in the message template
	* of your design to tune the look of the message.
	* Types set by the core are: 'info', 'status_ok', 'status_failed'
	*
	* @param string $message  Text of the message
	* @param string $type     Type of this message. this is not interpreted by the core
	*/
	function LCC_Message($message, $type = 'info')
	{
		$this->_message = $message;
		$this->_type = $type;
	}
	
	/**
	* Returns the text of this message
	*
	* @return string
	*/
	function getMessage()
	{
		return $this->_message;
	}
	
	/**
	* Returns the type of this message
	*
	* @return string
	*/
	function getType()
	{
		return $this->_type;
	}
}
?>
Return current item: Lightweight Club Calendar