Update the Introductions domain to use repository, model and collection

This commit is contained in:
Hypolite Petovan 2020-01-05 17:50:33 -05:00
parent 5a1abb8c7d
commit 6b8db5ad13
8 changed files with 124 additions and 86 deletions

View 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);
}
}