Files
php_8/methods/settings.php
2022-07-22 09:25:39 +03:00

25 lines
471 B
PHP

<?php
class Settings
{
private array $properties;
public function __get(string $key) : ?string
{
if (array_key_exists($key, $this->properties)) {
return $this->properties[$key];
} else {
return null;
}
}
public function __set(string $key, mixed $value) : void
{
$this->properties[$key] = $value;
}
public function list() : array
{
return $this->properties;
}
}