1 | <?php |
||
19 | class Status |
||
20 | { |
||
21 | const STATUS_NOTHING = 2; |
||
22 | const STATUS_INCREMENT = 4; |
||
23 | const STATUS_TIMEOUT = 8; |
||
24 | const STATUS_SELF = 16; |
||
25 | const STATUS_NO_USER = 32; |
||
26 | |||
27 | /** |
||
28 | * @var int |
||
29 | */ |
||
30 | protected $status = self::STATUS_NOTHING; |
||
31 | |||
32 | /** |
||
33 | * @var User |
||
34 | */ |
||
35 | protected $user; |
||
36 | |||
37 | /** |
||
38 | * Status constructor. |
||
39 | * @param User $mention |
||
40 | * @param int $status |
||
41 | */ |
||
42 | public function __construct(User $mention, $status = self::STATUS_NOTHING) |
||
47 | |||
48 | /** |
||
49 | * @return bool |
||
50 | */ |
||
51 | public function isNothing() |
||
55 | |||
56 | /** |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function isIncrement() |
||
63 | |||
64 | /** |
||
65 | * @return bool |
||
66 | */ |
||
67 | public function isTimeout() |
||
71 | |||
72 | /** |
||
73 | * @return bool |
||
74 | */ |
||
75 | public function isSelf() |
||
79 | |||
80 | /** |
||
81 | * @return bool |
||
82 | */ |
||
83 | public function isNoUser() |
||
87 | |||
88 | |||
89 | /** |
||
90 | * @return int |
||
91 | */ |
||
92 | public function getStatus() |
||
96 | |||
97 | /** |
||
98 | * @return User |
||
99 | */ |
||
100 | public function getUser() |
||
104 | |||
105 | /** |
||
106 | * @param $karma |
||
107 | * @return string|null |
||
108 | */ |
||
109 | public function getTranslation($karma) |
||
129 | } |
||
130 |