Campustream 1.0
A social network MQP for WPI
|
00001 <? 00002 00006 class Relationship_Model extends ActiveRecord { 00007 public $columns = array('target', 'source'); 00008 public $public_columns = array('target', 'source'); 00009 00013 public function set($source, $target) { 00014 $this->source = $source->limited_object(); 00015 $this->target = $target->limited_object(); 00016 00017 $this->source->followed_by = $source->is_followed_by($target); 00018 $this->source->following = $source->is_following($target); 00019 $this->target->followed_by = $target->is_followed_by($source); 00020 $this->target->following = $target->is_following($source); 00021 } 00022 }