改名
This commit is contained in:
@@ -11,11 +11,11 @@ namespace HttpServer\Http;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Exception\RequestException;
|
use HttpServer\Exception\RequestException;
|
||||||
use ReflectionException;
|
|
||||||
use Kiri\Core\Json;
|
use Kiri\Core\Json;
|
||||||
use Kiri\Core\Xml;
|
use Kiri\Core\Xml;
|
||||||
use Kiri\Exception\NotFindClassException;
|
use Kiri\Exception\NotFindClassException;
|
||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
|
use ReflectionException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class HttpParams
|
* Class HttpParams
|
||||||
@@ -118,10 +118,13 @@ trait HttpParams
|
|||||||
* @param null $default
|
* @param null $default
|
||||||
* @return mixed
|
* @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[$name] ?? $default;
|
||||||
}
|
}
|
||||||
|
return $this->_gets;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -382,5 +385,4 @@ trait HttpParams
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user