diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/UnfollowEvent.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/UnfollowEvent.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/UnfollowEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/UnfollowEvent.php new file mode 100644 index 00000000..bf9a35f8 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/UnfollowEvent.php | |||
@@ -0,0 +1,39 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Federation; | ||
4 | |||
5 | use Wallabag\FederationBundle\Entity\Account; | ||
6 | |||
7 | /** | ||
8 | * This event is fired as soon as an account is being unfollowed | ||
9 | */ | ||
10 | class UnfollowEvent extends FederationEvent | ||
11 | { | ||
12 | const NAME = 'federation.unfollow'; | ||
13 | |||
14 | protected $follower; | ||
15 | |||
16 | public function __construct(Account $accountFollowed, Account $follower) | ||
17 | { | ||
18 | parent::__construct($accountFollowed); | ||
19 | $this->follower = $follower; | ||
20 | } | ||
21 | |||
22 | /** | ||
23 | * @return Account | ||
24 | */ | ||
25 | public function getFollower() | ||
26 | { | ||
27 | return $this->follower; | ||
28 | } | ||
29 | |||
30 | /** | ||
31 | * @param Account $follower | ||
32 | * @return UnfollowEvent | ||
33 | */ | ||
34 | public function setFollower(Account $follower) | ||
35 | { | ||
36 | $this->follower = $follower; | ||
37 | return $this; | ||
38 | } | ||
39 | } | ||