Improve error handling and add detailed debugging option

This commit is contained in:
Dale Davies
2023-04-11 22:47:02 +01:00
parent d5467bf436
commit 345aced953
8 changed files with 171 additions and 9 deletions

View File

@@ -90,6 +90,7 @@ class Config {
$this->config->set($key, $value);
}
}
/**
* Determine if any configuration params are missing in the list loaded
* from the config.php.
@@ -121,6 +122,15 @@ class Config {
return trim($this->config->get($key));
}
/**
* Get all config paramaters and values as an array.
*
* @return array Multidimensional array of config params.
*/
public function get_all(): array {
return $this->config->toArray();
}
/**
* Attempt to converts a string to a boolean correctly, will return the parsed boolean
* or null on failure.