aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEvent.php
blob: e3807abfffc8af291418fa72a8236761607f34a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

namespace Wallabag\CoreBundle\Event\Activity\Actions\User;

use Symfony\Component\EventDispatcher\Event;
use Wallabag\UserBundle\Entity\User;

/**
 * This event is fired when user-related stuff is made.
 */
abstract class UserEvent extends Event
{
    protected $user;

    /**
     * UserEvent constructor.
     * @param User $user
     */
    public function __construct(User $user)
    {
        $this->user = $user;
    }

    /**
     * @return User
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * @param User $user
     * @return UserEvent
     */
    public function setUser(User $user)
    {
        $this->user = $user;
        return $this;
    }
}