1 | <?php namespace Anomaly\UsersModule\User\Event; |
||
12 | class UserWasKickedOut |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The user object. |
||
17 | * |
||
18 | * @var UserInterface |
||
19 | */ |
||
20 | protected $user; |
||
21 | |||
22 | /** |
||
23 | * The reason code the |
||
24 | * user was kicked out. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $reason; |
||
29 | |||
30 | /** |
||
31 | * Create a new UserWasKickedOut instance. |
||
32 | * |
||
33 | * @param UserInterface $user |
||
34 | * @param $reason |
||
35 | */ |
||
36 | function __construct(UserInterface $user, $reason) |
||
41 | |||
42 | /** |
||
43 | * Get the user. |
||
44 | * |
||
45 | * @return UserInterface |
||
46 | */ |
||
47 | public function getUser() |
||
51 | |||
52 | /** |
||
53 | * Get the reason. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getReason() |
||
61 | } |
||
62 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.