mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Fix php style
This commit is contained in:
parent
461bd9c98d
commit
b8bd067dc7
59 changed files with 2307 additions and 1868 deletions
|
@ -14,21 +14,26 @@ namespace models;
|
|||
class Setting extends StandardModel
|
||||
{
|
||||
/**
|
||||
* Return table name
|
||||
* @return string
|
||||
*/
|
||||
protected function get_table_name() : string { return 'setting'; }
|
||||
|
||||
|
||||
/**
|
||||
* Update a setting for a user by his name
|
||||
* @param int $id_user : user id
|
||||
* @param string $name : setting name
|
||||
* @param mixed $value : new value of the setting
|
||||
* Update a setting for a user by his name.
|
||||
*
|
||||
* @param int $id_user : user id
|
||||
* @param string $name : setting name
|
||||
* @param mixed $value : new value of the setting
|
||||
*
|
||||
* @return int : number of modified settings
|
||||
*/
|
||||
public function update_by_name_for_user(int $id_user, string $name, $value)
|
||||
{
|
||||
return $this->_update($this->get_table_name(), ['value' => $value], ['id_user' => $id_user, 'name' => $name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return table name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_table_name(): string
|
||||
{
|
||||
return 'setting';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue