From b07333f3c8fdebe5aefbe3951dd668f64da98828 Mon Sep 17 00:00:00 2001 From: kj Date: Mon, 16 Mar 2020 22:54:12 -0400 Subject: [PATCH] Improve params. --- src/Libs/Params.php | 4 ++++ src/Libs/Router.php | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Libs/Params.php b/src/Libs/Params.php index 63a9710..30b3190 100644 --- a/src/Libs/Params.php +++ b/src/Libs/Params.php @@ -13,6 +13,10 @@ class Params { } } + public function __isset($index) { + return isset($this->data[$index]); + } + public function __get($index){ return (isset($this->data[$index]) && $this->data[$index] != '') ? $this->data[$index] : null; } diff --git a/src/Libs/Router.php b/src/Libs/Router.php index d7c3cb6..f23b5b5 100644 --- a/src/Libs/Router.php +++ b/src/Libs/Router.php @@ -1,4 +1,5 @@