diff --git a/var/Typecho/Request.php b/var/Typecho/Request.php index 8cb1e5ef..6846033a 100644 --- a/var/Typecho/Request.php +++ b/var/Typecho/Request.php @@ -168,6 +168,29 @@ class Request return $value ?? $default; } + /** + * 获取实际传递参数(magic) + * + * @param string $key 指定参数 + * @return mixed + */ + public function __get(string $key) + { + return $this->get($key); + } + + /** + * 判断参数是否存在 + * + * @param string $key 指定参数 + * @return boolean + */ + public function __isset(string $key) + { + $this->get($key, null, $exists); + return $exists; + } + /** * 获取一个数组 *