This commit is contained in:
2021-08-17 16:33:57 +08:00
parent b808417359
commit 36856814b0
+5 -3
View File
@@ -11,11 +11,11 @@ namespace HttpServer\Http;
use Exception;
use HttpServer\Exception\RequestException;
use ReflectionException;
use Kiri\Core\Json;
use Kiri\Core\Xml;
use Kiri\Exception\NotFindClassException;
use Kiri\Kiri;
use ReflectionException;
/**
* Class HttpParams
@@ -118,10 +118,13 @@ trait HttpParams
* @param null $default
* @return mixed
*/
public function query($name, $default = null): mixed
public function query($name = null, $default = null): mixed
{
if (!empty($name)) {
return $this->_gets[$name] ?? $default;
}
return $this->_gets;
}
/**
@@ -382,5 +385,4 @@ trait HttpParams
}
}