Completed
Push — master ( 332a47...cbc99e )
by WEBEWEB
03:08
created

NotificationEvent::setType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the bootstrap-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\BootstrapBundle\Event;
13
14
/**
15
 * Notification event.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\BootstrapBundle\Event
19
 */
20
class NotificationEvent extends AbstractBootstrapEvent {
21
22
    /**
23
     * Notification.
24
     *
25
     * @var string
26
     */
27
    private $notification;
28
29
    /**
30
     * Type.
31
     *
32
     * @var string
33
     */
34
    private $type;
35
36
    /**
37
     * Constructor.
38
     *
39
     * @param string $eventName The event name.
40
     * @param string $notification The notification.
41
     * @param string $type The notification type.
42
     */
43
    public function __construct($eventName, $notification, $type) {
44
        parent::__construct($eventName);
45
        $this->setNotification($notification);
46
        $this->setType($type);
47
    }
48
49
    /**
50
     * Get the notification.
51
     *
52
     * @return string Returns the notification.
53
     */
54
    public function getNotification() {
55
        return $this->notification;
56
    }
57
58
    /**
59
     * Get the type.
60
     *
61
     * @return string Returns the type.
62
     */
63
    public function getType() {
64
        return $this->type;
65
    }
66
67
    /**
68
     * Set the notification.
69
     *
70
     * @param string $notification The notification.
71
     * @return NotificationEvent Returns this notification event.
72
     */
73
    protected function setNotification($notification) {
74
        $this->notification = $notification;
75
        return $this;
76
    }
77
78
    /**
79
     * Set the type.
80
     *
81
     * @param string $type The type.
82
     * @return NotificationEvent Returns this notification event.
83
     */
84
    protected function setType($type) {
85
        $this->type = $type;
86
        return $this;
87
    }
88
89
}
90