mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:10:11 +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
|
@ -17,14 +17,14 @@ abstract class BaseCollection extends \ArrayIterator
|
|||
protected $totalCount = 0;
|
||||
|
||||
/**
|
||||
* @param BaseModel[] $models
|
||||
* @param int|null $totalCount
|
||||
* @param BaseEntity[] $entities
|
||||
* @param int|null $totalCount
|
||||
*/
|
||||
public function __construct(array $models = [], int $totalCount = null)
|
||||
public function __construct(array $entities = [], int $totalCount = null)
|
||||
{
|
||||
parent::__construct($models);
|
||||
parent::__construct($entities);
|
||||
|
||||
$this->totalCount = $totalCount ?? count($models);
|
||||
$this->totalCount = $totalCount ?? count($entities);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue