. // }}} namespace App\Entity; /** * Entity for app configuration * * @category DB * @package GNUsocial * * @author Zach Copley * @copyright 2010 StatusNet Inc. * @author Mikael Nordfeldth * @copyright 2009-2014 Free Software Foundation, Inc http://www.fsf.org * @author Hugo Sales * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class Config { // {{{ Autocode private string $section; private string $setting; private ?string $value; public function setSection(string $section): self { $this->section = $section; return $this; } public function getSection(): string { return $this->section; } public function setSetting(string $setting): self { $this->setting = $setting; return $this; } public function getSetting(): string { return $this->setting; } public function setValue(?string $value): self { $this->value = $value; return $this; } public function getValue(): ?string { return $this->value; } // }}} Autocode public static function schemaDef(): array { return [ 'name' => 'config', 'fields' => [ 'section' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration section'], 'setting' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration setting'], 'value' => ['type' => 'text', 'description' => 'configuration value'], ], 'primary key' => ['section', 'setting'], ]; } }