still wip

This commit is contained in:
VersusTune 2020-03-28 20:11:51 +01:00
commit 9be884c8e4
13 changed files with 299 additions and 77 deletions

View file

@ -27,16 +27,6 @@ class Config
return self::$instance;
}
public function setVersion(float $param): void
{
if ($this->isWriteable) {
$this->version = $param;
} else {
trigger_error('try to write closed config!');
}
}
public function setDatabase(array $array): void
{
if ($this->isWriteable) {
@ -55,15 +45,6 @@ class Config
}
}
public function setMail(array $array): void
{
if ($this->isWriteable) {
$this->mail = $array;
} else {
trigger_error('try to write closed config!');
}
}
public function setRender(array $array): void
{
if ($this->isWriteable) {
@ -82,18 +63,21 @@ class Config
}
}
public function setDevMode(bool $mode): void
{
if ($this->isWriteable) {
$this->devMode = $mode;
}
}
public function getVersion(): float
{
return $this->version;
}
public function setVersion(float $param): void
{
if ($this->isWriteable) {
$this->version = $param;
} else {
trigger_error('try to write closed config!');
}
}
public function getApi(): array
{
return $this->api;
@ -104,6 +88,15 @@ class Config
return $this->mail;
}
public function setMail(array $array): void
{
if ($this->isWriteable) {
$this->mail = $array;
} else {
trigger_error('try to write closed config!');
}
}
public function getRenderer(): array
{
return $this->renderer;
@ -119,6 +112,15 @@ class Config
return $this->devMode;
}
public function setDevMode(bool $mode): void
{
if ($this->isWriteable) {
$this->devMode = $mode;
} else {
trigger_error('try to write closed config!');
}
}
/**
* function to close the write mode... this make sure after the config is init no other tool can write to it!
*/