mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-05-03 23:06:28 +02:00
29 lines
636 B
PHP
Executable file
29 lines
636 B
PHP
Executable file
<?php
|
|
namespace controllers\internals;
|
|
|
|
class Setting extends \InternalController
|
|
{
|
|
private $model_setting;
|
|
|
|
public function __construct (\PDO $bdd)
|
|
{
|
|
$this->model_setting = new \models\Setting($bdd);
|
|
}
|
|
|
|
/**
|
|
* Return all settings
|
|
* @return array || false
|
|
*/
|
|
public function all ()
|
|
{
|
|
return $this->model_setting->all();
|
|
}
|
|
|
|
/**
|
|
* Update a setting by his name
|
|
*/
|
|
public function update (string $name, $value) : boolean
|
|
{
|
|
return (bool) $this->model_setting->update($name, $value);
|
|
}
|
|
}
|