1 | <?php |
||
13 | class Packet implements PacketInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $name; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $data; |
||
24 | |||
25 | /** |
||
26 | * @var Stream |
||
27 | */ |
||
28 | protected $stream; |
||
29 | |||
30 | /** |
||
31 | * @var StreamHandler |
||
32 | */ |
||
33 | protected $streamHandler; |
||
34 | |||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | protected $propagationStopped; |
||
39 | |||
40 | 4 | public function __construct(string $name, array $data = []) |
|
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | 3 | public function getName() : string |
|
54 | |||
55 | /** |
||
56 | * @return array |
||
57 | */ |
||
58 | 1 | public function getData() : array |
|
62 | |||
63 | /** |
||
64 | * @return Stream |
||
65 | */ |
||
66 | 1 | public function getStream() : Stream |
|
70 | |||
71 | /** |
||
72 | * @param Stream $stream |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | 1 | public function setStream(Stream $stream) |
|
82 | |||
83 | /** |
||
84 | * @return StreamHandler |
||
85 | */ |
||
86 | 1 | public function getStreamHandler() : StreamHandler |
|
90 | |||
91 | /** |
||
92 | * @param StreamHandler $streamHandler |
||
93 | * |
||
94 | * @return $this |
||
95 | */ |
||
96 | 3 | public function setStreamHandler(StreamHandler $streamHandler) |
|
102 | |||
103 | 2 | public function isPropagationStopped() : bool |
|
107 | |||
108 | /** |
||
109 | * @return $this |
||
110 | */ |
||
111 | 1 | public function stopPropagation() : self |
|
117 | } |
||
118 |