]> git.mxchange.org Git - friendica.git/blob - src/Repository/Introduction.php
Merge pull request #10160 from annando/issue-10156
[friendica.git] / src / Repository / Introduction.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2021, the Friendica project
4  *
5  * @license GNU AGPL version 3 or any later version
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU Affero General Public License for more details.
16  *
17  * You should have received a copy of the GNU Affero General Public License
18  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19  *
20  */
21
22 namespace Friendica\Repository;
23
24 use Friendica\BaseRepository;
25 use Friendica\Collection;
26 use Friendica\Model;
27
28 class Introduction extends BaseRepository
29 {
30         protected static $table_name = 'intro';
31
32         protected static $model_class = Model\Introduction::class;
33
34         protected static $collection_class = Collection\Introductions::class;
35
36         /**
37          * @param array $data
38          * @return Model\Introduction
39          */
40         protected function create(array $data)
41         {
42                 return new Model\Introduction($this->dba, $this->logger, $this, $data);
43         }
44
45         /**
46          * @param array $condition
47          * @return Model\Introduction
48          * @throws \Friendica\Network\HTTPException\NotFoundException
49          */
50         public function selectFirst(array $condition)
51         {
52                 return parent::selectFirst($condition);
53         }
54
55         /**
56          * @param array $condition
57          * @param array $params
58          * @return Collection\Introductions
59          * @throws \Exception
60          */
61         public function select(array $condition = [], array $params = [])
62         {
63                 return parent::select($condition, $params);
64         }
65
66         /**
67          * @param array    $condition
68          * @param array    $params
69          * @param int|null $min_id
70          * @param int|null $max_id
71          * @param int      $limit
72          * @return Collection\Introductions
73          * @throws \Exception
74          */
75         public function selectByBoundaries(array $condition = [], array $params = [], int $min_id = null, int $max_id = null, int $limit = self::LIMIT)
76         {
77                 return parent::selectByBoundaries($condition, $params, $min_id, $max_id, $limit);
78         }
79 }