3 namespace Friendica\Repository;
5 use Friendica\BaseRepository;
6 use Friendica\Collection;
9 class FSuggest extends BaseRepository
11 protected static $table_name = 'fsuggest';
13 protected static $model_class = Model\FSuggest::class;
15 protected static $collection_class = Collection\FSuggests::class;
19 * @return Model\FSuggest
21 protected function create(array $data)
23 return new Model\FSuggest($this->dba, $this->logger, $data);
27 * Returns the Friend Suggest based on it's ID
29 * @param int $id The id of the fsuggest
31 * @return Model\FSuggest
33 * @throws \Friendica\Network\HTTPException\NotFoundException
35 public function getById(int $id)
37 return $this->selectFirst(['id' => $id]);
41 * @param array $condition
42 * @return Model\FSuggest
43 * @throws \Friendica\Network\HTTPException\NotFoundException
45 public function selectFirst(array $condition)
47 return parent::selectFirst($condition);
51 * @param array $condition
52 * @param array $params
53 * @return Collection\FSuggests
56 public function select(array $condition = [], array $params = [])
58 return parent::select($condition, $params);
62 * @param array $condition
63 * @param array $params
64 * @param int|null $max_id
65 * @param int|null $since_id
67 * @return Collection\FSuggests
70 public function selectByBoundaries(array $condition = [], array $params = [], int $max_id = null, int $since_id = null, int $limit = self::LIMIT)
72 return parent::selectByBoundaries($condition, $params, $max_id, $since_id, $limit);