mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
first refonte
This commit is contained in:
commit
9e9cd47b91
226 changed files with 34307 additions and 0 deletions
25
models/Setting.php
Executable file
25
models/Setting.php
Executable file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
namespace models;
|
||||
/**
|
||||
* Cette classe gère les accès bdd pour les settinges
|
||||
*/
|
||||
class Setting extends \Model
|
||||
{
|
||||
/**
|
||||
* Return array of all settings
|
||||
*/
|
||||
public function all () : array
|
||||
{
|
||||
return $this->select('setting', [], '', false, $limit, $offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a setting by his name
|
||||
* @return int : number of modified lines
|
||||
*/
|
||||
public function update (string $name, $value) : int
|
||||
{
|
||||
return $this->update('setting', ['value' => $value], ['name' => $name]);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue