#68 - reply working + remove marker on comment delete
This commit is contained in:
parent
cf83edc1e6
commit
231bb21a4f
9 changed files with 64 additions and 95 deletions
|
|
@ -3,14 +3,16 @@
|
|||
namespace adrienpayet\comments;
|
||||
use adrienpayet\D2P\data\location\Location;
|
||||
use adrienpayet\D2P\data\Author;
|
||||
use adrienpayet\D2P\data\Position;
|
||||
|
||||
class BaseComment {
|
||||
protected string $type;
|
||||
protected Location $location;
|
||||
protected string $text;
|
||||
protected Author $author;
|
||||
protected string $text;
|
||||
protected string $date;
|
||||
protected string $id;
|
||||
protected Position $position;
|
||||
|
||||
public function __construct($data) {
|
||||
$this->location = new Location($data["location"]);
|
||||
|
|
@ -18,11 +20,13 @@ class BaseComment {
|
|||
$this->author = new Author($data["author"]);
|
||||
$this->date = $data["date"];
|
||||
$this->id = $data["id"];
|
||||
$this->position = new Position($data['position']);
|
||||
}
|
||||
|
||||
public function toArray() {
|
||||
return [
|
||||
"location" => $this->location->toArray(),
|
||||
"position" => $this->position->toArray(),
|
||||
"text" => $this->text,
|
||||
"author" => $this->author->toArray(),
|
||||
"date" => $this->date,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue