24 lines
457 B
PHP
24 lines
457 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, $value): void
|
|
{
|
|
$this->properties[$key] = $value;
|
|
}
|
|
public function list(): array
|
|
{
|
|
return $this->properties;
|
|
}
|
|
}
|