]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/UnfollowEvent.php
WIP
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Event / Activity / Actions / Federation / UnfollowEvent.php
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 (file)
index 0000000..bf9a35f
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Wallabag\CoreBundle\Event\Activity\Actions\Federation;
+
+use Wallabag\FederationBundle\Entity\Account;
+
+/**
+ * This event is fired as soon as an account is being unfollowed
+ */
+class UnfollowEvent extends FederationEvent
+{
+    const NAME = 'federation.unfollow';
+
+    protected $follower;
+
+    public function __construct(Account $accountFollowed, Account $follower)
+    {
+        parent::__construct($accountFollowed);
+        $this->follower = $follower;
+    }
+
+    /**
+     * @return Account
+     */
+    public function getFollower()
+    {
+        return $this->follower;
+    }
+
+    /**
+     * @param Account $follower
+     * @return UnfollowEvent
+     */
+    public function setFollower(Account $follower)
+    {
+        $this->follower = $follower;
+        return $this;
+    }
+}