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