]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseEntity.php
Notifications cleared for a whole thread in case of one mark seen
[friendica.git] / src / BaseEntity.php
index 9f0cb31f8ea5c8297b34c3112dc6c9f59fe24f53..14f95c197ecef43caa27d34e32e0c97e55ee376a 100644 (file)
@@ -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);
        }