Location: PHPKode > projects > Anahita Social Engine > admin/models/configurations.php
<?php
/**
* @version		1.0.0
* @package		Anahita SocialEngine
* @copyright	Copyright (C) 2007 - 2010 rmd Studio Inc. and Peerglobe Technology Inc. All rights reserved.
* @license		GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
* @link 		http://www.anahitapolis.com
*/

class ComSocialengineModelConfigurations extends KModelAbstract
{
	public function __construct(array $options = array())
	{
		parent::__construct($options);
		$this->_db = KFactory::get('lib.koowa.database');
	}
	
	public function getParams()
	{
		
		$q = KFactory::get('lib.koowa.database.query')
		->select('params')
		->from('components')
		->where('option', '=', 'com_socialengine')
		;
		
		$params = $this->_db->fetchResult($q);
		
		return $params;
	}
	
	public function saveParams($params='')
	{
		$q = KFactory::get('lib.koowa.database.query');
		
		return $this->_db->update('components', array('params'=>$params), $q->where('option', '=', 'com_socialengine'));
	}
	
//end class	
}
Return current item: Anahita Social Engine