mirror of
https://github.com/friendica/friendica
synced 2025-04-27 08:30:10 +00:00
Update the Introductions domain to use repository, model and collection
This commit is contained in:
parent
5a1abb8c7d
commit
6b8db5ad13
8 changed files with 124 additions and 86 deletions
30
src/Repository/Introduction.php
Normal file
30
src/Repository/Introduction.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Repository;
|
||||
|
||||
use Friendica\BaseRepository;
|
||||
use Friendica\Collection;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
* @method Model\Introduction selectFirst(array $condition)
|
||||
* @method Collection\Introductions select(array $condition = [], array $params = [])
|
||||
* @method Collection\Introductions selectByBoundaries(array $condition = [], array $params = [], int $max_id = null, int $since_id = null, int $limit = self::LIMIT)
|
||||
*/
|
||||
class Introduction extends BaseRepository
|
||||
{
|
||||
protected static $table_name = 'intro';
|
||||
|
||||
protected static $model_class = Model\Introduction::class;
|
||||
|
||||
protected static $collection_class = Collection\Introductions::class;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return Model\Introduction
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return new Model\Introduction($this->dba, $this->logger, $this, $data);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue