X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=14f95c197ecef43caa27d34e32e0c97e55ee376a;hb=7909d9c41741630a4c8e3e799429d58995ec7eea;hp=9f0cb31f8ea5c8297b34c3112dc6c9f59fe24f53;hpb=0de8e4db080b5739d77d6394eb5c2904e5d1b66f;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index 9f0cb31f8e..14f95c197e 100644 --- a/src/BaseEntity.php +++ b/src/BaseEntity.php @@ -11,7 +11,22 @@ namespace Friendica; */ abstract class BaseEntity implements \JsonSerializable { + /** + * Returns the current entity as an json array + * + * @return array + */ public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Returns the current entity as an array + * + * @return array + */ + public function toArray() { return get_object_vars($this); }