From ae8c934b5fb7b5b95d922bc582b43ff9d6d2f00a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 23 Nov 2013 19:14:45 +0100 Subject: [PATCH] Allow accessing Config data keys directly --- src/utils/Config.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/utils/Config.php b/src/utils/Config.php index 31babceb8..9291e2789 100644 --- a/src/utils/Config.php +++ b/src/utils/Config.php @@ -150,6 +150,22 @@ class Config{ } } + public function __get($k){ + return $this->get($k); + } + + public function __set($k, $v){ + return $this->set($k, $v); + } + + public function __isset($k){ + return $this->exists($k); + } + + public function __unset($k){ + return $this->remove($k); + } + public function get($k){ if($this->correct === false or !isset($this->config[$k])){ return false;