ComunicAPI/classes/models/Friend.php

56 lines
1.2 KiB
PHP
Raw Normal View History

2018-02-03 14:17:25 +00:00
<?php
/**
* Friend model
*
2018-04-19 07:48:59 +00:00
* @author Pierre HUBERT
2018-02-03 14:17:25 +00:00
*/
class Friend {
//Private fields
private $friendID;
private $accepted;
private $following;
private $last_activity_time;
2018-03-05 18:04:21 +00:00
private $can_post_texts;
2018-02-03 14:17:25 +00:00
//Set and get friend ID
public function setFriendID(int $id){
$this->friendID = $id;
}
public function getFriendID() : int {
return $this->friendID;
}
//Set and get the accepted state of the friendship
public function setAccepted(bool $accepted){
$this->accepted = $accepted;
}
public function isAccepted() : bool {
return $this->accepted;
}
//Set and get the following state of the friendship
public function setFollowing(bool $following){
$this->following = $following;
}
public function isFollowing() : bool {
return $this->following;
}
//Set and get the last activity time of the friend
public function setLastActivityTime(int $time){
$this->last_activity_time = $time;
}
public function getLastActivityTime() : int {
return $this->last_activity_time;
}
2018-03-05 18:04:21 +00:00
//Set and get the post creation authorization status
public function setCanPostTexts(bool $can_post_texts){
$this->can_post_texts = $can_post_texts;
}
public function canPostTexts() : bool {
return $this->can_post_texts;
}
2018-02-03 14:17:25 +00:00
}