mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 07:18: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
|
* @deprecated 2025.05 Use `\Friendica\BaseRepository::_selectFirstRowAsArray()` instead
|
||||||
* @param array $params
|
*
|
||||||
* @return BaseEntity
|
|
||||||
* @throws NotFoundException
|
* @throws NotFoundException
|
||||||
*/
|
*/
|
||||||
protected function _selectOne(array $condition, array $params = []): BaseEntity
|
protected function _selectOne(array $condition, array $params = []): BaseEntity
|
||||||
{
|
{
|
||||||
$fields = $this->db->selectFirst(static::$table_name, [], $condition, $params);
|
$fields = $this->_selectFirstRowAsArray( $condition, $params);
|
||||||
|
|
||||||
if (!$this->db->isResult($fields)) {
|
|
||||||
throw new NotFoundException();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->factory->createFromTableRow($fields);
|
return $this->factory->createFromTableRow($fields);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue