1 | <?php |
||
2 | /** |
||
3 | * @author: RunnerLee |
||
4 | * @email: [email protected] |
||
5 | * @time: 2018-02 |
||
6 | */ |
||
7 | |||
8 | namespace Runner\Heshen\Event; |
||
9 | |||
10 | use Runner\Heshen\Contracts\StatefulInterface; |
||
11 | use Symfony\Component\EventDispatcher\Event as BaseEvent; |
||
12 | |||
13 | class Event extends BaseEvent |
||
0 ignored issues
–
show
Deprecated Code
introduced
by
![]() |
|||
14 | { |
||
15 | /** |
||
16 | * @var StatefulInterface |
||
17 | */ |
||
18 | protected $stateful; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $parameters; |
||
24 | |||
25 | /** |
||
26 | * Event constructor. |
||
27 | * |
||
28 | * @param StatefulInterface $stateful |
||
29 | * @param array $parameters |
||
30 | */ |
||
31 | 2 | public function __construct(StatefulInterface $stateful, array $parameters = []) |
|
32 | { |
||
33 | 2 | $this->stateful = $stateful; |
|
34 | 2 | $this->parameters = $parameters; |
|
35 | 2 | } |
|
36 | |||
37 | /** |
||
38 | * @return StatefulInterface |
||
39 | */ |
||
40 | 1 | public function getStateful(): StatefulInterface |
|
41 | { |
||
42 | 1 | return $this->stateful; |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return array |
||
47 | */ |
||
48 | 1 | public function getParameters(): array |
|
49 | { |
||
50 | 1 | return $this->parameters; |
|
51 | } |
||
52 | } |
||
53 |