diff --git a/src/Libs/Params.php b/src/Libs/Params.php index bc14631..1ec8542 100644 --- a/src/Libs/Params.php +++ b/src/Libs/Params.php @@ -3,14 +3,18 @@ namespace Libs; class Params { + + private $data; + public function __construct($args){ + $this->data = []; foreach($args as $index => $value){ - $this->$index = $value; + $this->data[$index] = $value; } } public function __get($index){ - return (isset($this->$index) && $this->$index != '') ? urldecode($this->$index) : null; + return (isset($this->data[$index]) && $this->data[$index] != '') ? urldecode($this->data[$index]) : null; } }