diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-05-31 09:31:18 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-23 10:08:54 +0200 |
commit | bf6c0346d8d35a719dd1bff1cb4d573d422f99ff (patch) | |
tree | 04fb80e20ad1cffacb72357a632a9afe2ec058cb /src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/FollowEvent.php | |
parent | d6d3f4ec3698effd1d4b063e295341791bdcf7d7 (diff) | |
download | wallabag-federation.tar.gz wallabag-federation.tar.zst wallabag-federation.zip |
WIPfederation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/FollowEvent.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/FollowEvent.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/FollowEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/FollowEvent.php new file mode 100644 index 00000000..4004932e --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/FollowEvent.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 was followed. | ||
9 | */ | ||
10 | class FollowEvent extends FederationEvent | ||
11 | { | ||
12 | const NAME = 'federation.follow'; | ||
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 FollowEvent | ||
33 | */ | ||
34 | public function setFollower(Account $follower) | ||
35 | { | ||
36 | $this->follower = $follower; | ||
37 | return $this; | ||
38 | } | ||
39 | } | ||