Location: PHPKode > projects > Anahita Social Engine > dependencies/plg_system_socialengine/socialengine/model/edge/social.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 AnModelEdgeSocial extends AnModelEdge
{
	
	public static function describe($model)
	{
		parent::describe($model);
		$model->rawQuery()->where('edge.type','=','social');
	}
		
	public function awakeFromInsert()
	{
		$this->_set('type', 	   'social');
		$this->_set('directed',	   true);
	}
		
	public function setMeta($meta)
	{
		if ( $meta == 'follow' ) 
			$meta = '';
		$this->_set('meta', $meta);
	}
		
	public function setToBlock()
	{
		$this->meta = 'block';
		return $this;
	}
	
	public function setToFollow()
	{
		$this->meta = '';
		return $this;		
	}
	
	public function isBlock()
	{
		return $this->meta == 'block';
	}
	
	public function isFollow()
	{
		return $this->meta == '';
	}
}
Return current item: Anahita Social Engine