mirror of
https://github.com/friendica/friendica
synced 2025-04-26 08:30:10 +00:00
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:
parent
4a3544582c
commit
582f6bd4a3
9 changed files with 164 additions and 109 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue