Example #1
0
 /**
  * Create a new event instance.
  *
  * @return void
  *
  * $flg -> increment or decrement
  */
 public function __construct($notify_user, $topics_uuid, $is_upvote)
 {
     $this->user = $notify_user;
     $notification = new Notification();
     $this->count = $notification->countNotification($notify_user);
     $this->is_upvote = $is_upvote;
     //Get the most upvote count*/
     $tp = new Topic();
     $this->upv_cnt = $tp->upvoteTopic($topics_uuid, $is_upvote);
     $this->topic = $topics_uuid;
 }