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 Comment extends BaseComment
{
protected $position;
public function __construct($data) {
parent::__construct($data);
$this->position = $data['position'] ?? null;
}
public function position() {
return $this->position;
}
public function toArray() {
$array = parent::toArray();
$array['position'] = $this->position;
return $array;
}
}