Location: PHPKode > scripts > Lightweight Club Calendar > lc-calendar-0.9.4/core/lcc_userdriver.class.php
<?php
/**
* Class file for generic Userclass
*
* 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 represents a Userobject and is responsible to handle user data such as groups and userfields etc
*
* Its neccessary to subclass this class, so it gets the methods to store/retrieve the user data.
*
* It is neccessary, that a custom driver is loaded, which extends this class so
* userdata is really read.
*
* To write your own driver, follow the instructions in the documentation,
* but you just need to subclass this class and make sure it is used (-> config)
*/
class LCC_UserDriver extends LCC_Driver
{
	/**
	* Allowed note public fields
	*
	* @see LCC_Driver::_allowedFields
	* @access private
	* @var array
	*/
	var $_allowedFields = array();
	
	/**
	* Event fields managed by LCC (metadata)
	*
	* @see LCC_Driver::_allowedFields
	* @access private
	* @var array
	*/
	var $_metaFields = array();
	
	/**
	* Stores the nickname of the user
	*
	* @access private
	* @var string
	*/
	var $_nick = false;
	
	/**
	* Methods the class (and extends) HAS TO provide to be compatible with the core.
	*
	* @see LCC_Driver::_needed_methods
	* @access private
	* @var array
	*/
	var $_needed_methods = array('fetchlogin', 'getgroups', 'getgroupmembers' , 'getgroupsleaded', 'getlevel');

	/**
	* Postprocessor for reading data
	*
	* This postprocessor is called from the core after getting the secured
	* data. It enables to perform some driver type unique actions.
	* Here, we do nothing but serve the method for future purposes.
	*
	* THIS METHOD IS FOR FUTURE USAGE ONLY - CURRENTLY IT SERVES NO PURPOSE
	* THE METHOD AS WELL AS THE CALLING METHOD LCC_Driver::getAllData()
	* MUST MOST LIKELY BE ADJUSTED IF USER DATA IS IMPLEMENTED
	*
	* @access private
	* @param array $data   Data as fetched by {@link LCC_Driver::getSecuredData()}
	* @param mixed $user   username of the user in question
	* @return array        Processed data array
	*/
	function _getDataPostprocessor($data, $user)
	{
		return $data;
	}
}
?>
Return current item: Lightweight Club Calendar