3 namespace Friendica\Api;
6 * The API entity classes are meant as data transfer objects. As such, their member should be protected.
7 * Then the JsonSerializable interface ensures the protected members will be included in a JSON encode situation.
9 * Constructors are supposed to take as arguments the Friendica dependencies/model/collection/data it needs to
10 * populate the class members.
12 abstract class BaseEntity implements \JsonSerializable
14 public function jsonSerialize()
16 return get_object_vars($this);