2020-02-09 23:02:19 +01:00
|
|
|
<?php
|
|
|
|
|
2022-11-18 18:06:46 +01:00
|
|
|
namespace Core\Objects;
|
2020-02-09 23:02:19 +01:00
|
|
|
|
|
|
|
abstract class ApiObject implements \JsonSerializable {
|
|
|
|
|
2021-04-03 10:39:13 +02:00
|
|
|
public abstract function jsonSerialize(): array;
|
2020-02-09 23:02:19 +01:00
|
|
|
|
2022-02-20 16:53:26 +01:00
|
|
|
public function __toString() { return json_encode($this->jsonSerialize()); }
|
2020-02-09 23:02:19 +01:00
|
|
|
|
|
|
|
}
|