改名
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user