| 1 | <?php |
||
| 23 | class NotificationException extends FoundationException |
||
| 24 | { |
||
| 25 | protected $channel; |
||
| 26 | protected $pid; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * __construct |
||
| 30 | * |
||
| 31 | * Exception constructor. |
||
| 32 | * |
||
| 33 | * @access public |
||
| 34 | * @param array $notification |
||
| 35 | */ |
||
| 36 | public function __construct(array $notification) |
||
| 37 | { |
||
| 38 | $this->channel = $notification['message']; |
||
| 39 | $this->pid = $notification['pid']; |
||
| 40 | $this->message = $notification['payload']; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * getChannel |
||
| 45 | * |
||
| 46 | * Return the channel's name. |
||
| 47 | * |
||
| 48 | * @access public |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function getChannel() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * getPid |
||
| 58 | * |
||
| 59 | * Return the server's PID. |
||
| 60 | * |
||
| 61 | * @access public |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getPid() |
||
| 68 | } |
||
| 69 |