1 | <?php |
||
11 | class Notification |
||
12 | { |
||
13 | private $channel; |
||
14 | private $pid; |
||
15 | private $payload; |
||
16 | |||
17 | public function __construct(string $channel, int $pid, ?string $payload) |
||
23 | |||
24 | /** |
||
25 | * @return string name of the IPC channel the notification was sent through |
||
26 | */ |
||
27 | public function getChannel(): string |
||
31 | |||
32 | /** |
||
33 | * @return int ID of the database server process which sent the notification |
||
34 | */ |
||
35 | public function getSenderBackendPID(): int |
||
36 | { |
||
37 | return $this->pid; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return string|null the notification payload, or <tt>null</tt> if no payload is contained |
||
42 | */ |
||
43 | public function getPayload(): ?string |
||
47 | } |
||
48 |