mirror of
https://github.com/friendica/friendica
synced 2025-04-28 11:04:22 +02:00
Introduce "order" and "limit" argument instead of "param" array for BaseRepository and make Repositories more Dependency Injectable
This commit is contained in:
parent
26d6afd27f
commit
b46b72ad3b
4 changed files with 59 additions and 39 deletions
|
@ -35,26 +35,28 @@ class Introduction extends BaseRepository
|
|||
|
||||
/**
|
||||
* @param array $condition
|
||||
* @param array $params
|
||||
* @param array $order An optional array with order information
|
||||
* @param int|array $limit Optional limit information
|
||||
*
|
||||
* @return Collection\Introductions
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function select(array $condition = [], array $params = [])
|
||||
public function select(array $condition = [], array $order = [], $limit = null)
|
||||
{
|
||||
return parent::select($condition, $params);
|
||||
return parent::select($condition, $order, $limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $condition
|
||||
* @param array $params
|
||||
* @param array $order
|
||||
* @param int|null $max_id
|
||||
* @param int|null $since_id
|
||||
* @param int $limit
|
||||
* @param int|array $limit
|
||||
* @return Collection\Introductions
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function selectByBoundaries(array $condition = [], array $params = [], int $max_id = null, int $since_id = null, int $limit = self::LIMIT)
|
||||
public function selectByBoundaries(array $condition = [], array $order = [], int $max_id = null, int $since_id = null, int $limit = self::LIMIT)
|
||||
{
|
||||
return parent::selectByBoundaries($condition, $params, $max_id, $since_id, $limit);
|
||||
return parent::selectByBoundaries($condition, $order, $max_id, $since_id, $limit);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue