Refactor API notification usage
- Remove "mapFields()" from BaseModel - Add new Notification API entity (including collection) - Add new NotificationFactory method "getApiList()"
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user