X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=1ea3f8a16b2d713360c0c7a2d16645fdc6673d59;hb=8f10cf8e53a8f5583b9c5db0259a204a641d0864;hp=9f0cb31f8ea5c8297b34c3112dc6c9f59fe24f53;hpb=0de8e4db080b5739d77d6394eb5c2904e5d1b66f;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index 9f0cb31f8e..1ea3f8a16b 100644 --- a/src/BaseEntity.php +++ b/src/BaseEntity.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica; @@ -11,7 +30,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); }