diff --git a/Object.php b/Object.php new file mode 100644 index 0000000..9989a60 --- /dev/null +++ b/Object.php @@ -0,0 +1,32 @@ +config = $global_config; + unset($global_config); + } + + public function get(string $key):array|string { + if(strpos($key, ".") !== FALSE) { + $keys = explode(".", $key); + $arr = $this->config; + $ret = ""; + foreach($keys as $keyn) { + if(gettype($arr[$keyn]) === "array") { + $arr = $this->config[$keyn]; + } else { + $ret = $arr[$keyn]; + } + } + return $ret; + } + return $this->config[$key]; + } + + public function get_all():array { + return $this->config; + } + }