mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 22:17:17 +02:00
Deprecate BaseRepository::_selectOne()
This commit is contained in:
parent
2254bee74d
commit
16cbaf890a
1 changed files with 3 additions and 8 deletions
|
@ -148,18 +148,13 @@ abstract class BaseRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array $condition
|
||||
* @param array $params
|
||||
* @return BaseEntity
|
||||
* @deprecated 2025.05 Use `\Friendica\BaseRepository::_selectFirstRowAsArray()` instead
|
||||
*
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
protected function _selectOne(array $condition, array $params = []): BaseEntity
|
||||
{
|
||||
$fields = $this->db->selectFirst(static::$table_name, [], $condition, $params);
|
||||
|
||||
if (!$this->db->isResult($fields)) {
|
||||
throw new NotFoundException();
|
||||
}
|
||||
$fields = $this->_selectFirstRowAsArray( $condition, $params);
|
||||
|
||||
return $this->factory->createFromTableRow($fields);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue