mirror of
https://github.com/friendica/friendica
synced 2025-04-30 07:44:22 +02:00
Add Model\Contact::select method
This commit is contained in:
parent
9f4fb4906a
commit
71546705f8
2 changed files with 15 additions and 3 deletions
|
@ -110,6 +110,20 @@ class Contact extends BaseObject
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
* @param array $params Array of several parameters
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function select(array $fields = [], array $condition = [], array $params = [])
|
||||
{
|
||||
$statement = DBA::select('contact', $fields, $condition, $params);
|
||||
|
||||
return DBA::toArray($statement);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $id
|
||||
* @return array|boolean Contact record if it exists, false otherwise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue