create comment classes

This commit is contained in:
isUnknown 2024-10-30 09:49:16 +01:00
parent cd1f065962
commit f5ffe312e2
8 changed files with 246 additions and 63 deletions

View file

@ -0,0 +1,24 @@
<?php
namespace adrienpayet\comments;
class Reply extends BaseComment {
protected $parentId;
public function __construct($data) {
parent::__construct($data);
$this->parentId = $data['parentId'];
}
public function parentId() {
return $this->parentId;
}
public function toArray() {
$array = parent::toArray();
$array['parentId'] = $this->parentId;
return $array;
}
}