| 1 | <?php |
||
| 21 | class CommentEvent extends Event |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $type; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $entityId; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var CommentInterface |
||
| 35 | */ |
||
| 36 | private $comment; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var ThreadInterface |
||
| 40 | */ |
||
| 41 | private $thread; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $type |
||
| 45 | * @param string $entityId |
||
| 46 | * @param CommentInterface $comment |
||
| 47 | * @param ThreadInterface $thread |
||
| 48 | */ |
||
| 49 | 17 | public function __construct($type, $entityId, CommentInterface $comment, ThreadInterface $thread) |
|
| 50 | { |
||
| 51 | 17 | $this->type = $type; |
|
| 52 | 17 | $this->entityId = $entityId; |
|
| 53 | 17 | $this->comment = $comment; |
|
| 54 | 17 | $this->thread = $thread; |
|
| 55 | 17 | } |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Returns type. |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function getType() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Returns entity-id. |
||
| 69 | * |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getEntityId() |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Returns comment. |
||
| 79 | * |
||
| 80 | * @return CommentInterface |
||
| 81 | */ |
||
| 82 | 5 | public function getComment() |
|
| 86 | |||
| 87 | /** |
||
| 88 | * Returns thread. |
||
| 89 | * |
||
| 90 | * @return ThreadInterface |
||
| 91 | */ |
||
| 92 | public function getThread() |
||
| 96 | } |
||
| 97 |