mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-07-25 17:13:08 +00:00
25 lines
471 B
PHP
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;
|
|
}
|
|
}
|