Location: PHPKode > projects > Anahita Social Engine > dependencies/plg_system_socialengine/socialengine/model/node/node.php
<?php
/**
 * @version		1.0.0
 * @category	Anahita Social Engine™
 * @copyright	Copyright (C) 2008 - 2010 rmdStudio 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 AnModelNode extends AnDomainModelAbstract
{
	static function describe($model)
	{
		$model->useTable('socialengine_nodes AS node');
		$model->property('id', 	 	  		  array('field'=>'node.socialengine_node_id', 'unique'=>true));
		$model->property('type', 	 	 	  array('required'=>true, 'field'=>'node.type'));
		$model->belongsTo('application',	  array('required'=>true, 'model'=>'lib.anahita.model.application', 'condition'=>array('component'=>'component')));
	}
	
	public function awakeFromInsert()
	{	
		$this->_set('type', (string) $this->getIdentifier());
		$this->_set('application', AnModelApplicationHelper::getApplicationByIdentifier( $this->getIdentifier() ));
	}

	/**
	 * Return the person acl rule
	 * @return 
	 */
	public function getAcl()
	{
		return KFactory::tmp('lib.anahita.model.acl', array('node'=>$this));
	}
	
	/**
	 * Set the person acl rule
	 * @return 
	 */
	public function setAcl()
	{
		
	}
	
//end class	
}
Return current item: Anahita Social Engine