Subscription.php
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
namespace FootyRoom\Core\Subscription;
class Subscription
{
/**
* @var int
*/
protected $id;
/**
* @var int
*/
protected $userId;
/**
* @var int
*/
protected $subjectId;
/**
* @var string
*/
protected $subjectType;
/**
* Can be 'follow' or 'ignore'.
*
* @var string
*/
protected $status;
/**
* Constructor.
*
* @param int $subjectId
* @param string $subjectType
* @param int $userId
*/
public function __construct($subjectId, $subjectType, $userId)
{
$this->subjectId = $subjectId;
$this->subjectType = $subjectType;
$this->userId = $userId;
}
/**
* Gets the value of id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Gets the value of status.
*
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* Gets the value of subjectId.
*
* @return int
*/
public function getSubjectId()
{
return $this->subjectId;
}
/**
* Gets the value of subjectType.
*
* @return string
*/
public function getSubjectType()
{
return $this->subjectType;
}
/**
* Gets the value of userId.
*
* @return string
*/
public function getUserId()
{
return $this->userId;
}
/**
* Make this a 'follow' subscription.
*/
public function follow()
{
$this->status = 'follow';
}
/**
* Make this an 'ignore' subscription.
*/
public function ignore()
{
$this->status = 'ignore';
}
}