1 | <?php |
||
16 | class Status |
||
17 | { |
||
18 | const STATUS_NOTHING = 2; |
||
19 | const STATUS_INCREMENT = 4; |
||
20 | const STATUS_TIMEOUT = 8; |
||
21 | const STATUS_SELF = 16; |
||
22 | const STATUS_NO_USER = 32; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $status = self::STATUS_NOTHING; |
||
28 | |||
29 | /** |
||
30 | * @var User |
||
31 | */ |
||
32 | protected $user; |
||
33 | |||
34 | /** |
||
35 | * Status constructor. |
||
36 | * @param User $mention |
||
37 | * @param int $status |
||
38 | */ |
||
39 | public function __construct(User $mention, $status = self::STATUS_NOTHING) |
||
44 | |||
45 | /** |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function isNothing() |
||
52 | |||
53 | /** |
||
54 | * @return bool |
||
55 | */ |
||
56 | public function isIncrement() |
||
60 | |||
61 | /** |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function isTimeout() |
||
68 | |||
69 | /** |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function isSelf() |
||
76 | |||
77 | /** |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function isNoUser() |
||
84 | |||
85 | |||
86 | /** |
||
87 | * @return int |
||
88 | */ |
||
89 | public function getStatus() |
||
93 | |||
94 | /** |
||
95 | * @return User |
||
96 | */ |
||
97 | public function getUser() |
||
101 | |||
102 | /** |
||
103 | * @param $karma |
||
104 | * @return string|null |
||
105 | */ |
||
106 | public function getTranslation($karma) |
||
126 | } |
||
127 |