mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-22 20:54:52 +00:00
add value definition support
This commit is contained in:
parent
3a4e498c34
commit
7f892b0772
@ -15,8 +15,13 @@ class AppModelRequest {
|
||||
$this->_server = $server;
|
||||
}
|
||||
|
||||
public function get(string $key) : mixed
|
||||
public function get(string $key, mixed $value = null) : mixed
|
||||
{
|
||||
if ($value)
|
||||
{
|
||||
$this->_get[$key] = $value;
|
||||
}
|
||||
|
||||
if (isset($this->_get[$key]))
|
||||
{
|
||||
return $this->_get[$key];
|
||||
@ -28,8 +33,13 @@ class AppModelRequest {
|
||||
}
|
||||
}
|
||||
|
||||
public function post(string $key) : mixed
|
||||
public function post(string $key, mixed $value = null) : mixed
|
||||
{
|
||||
if ($value)
|
||||
{
|
||||
$this->_get[$key] = $value;
|
||||
}
|
||||
|
||||
if (isset($this->_post[$key]))
|
||||
{
|
||||
return $this->_post[$key];
|
||||
@ -41,8 +51,13 @@ class AppModelRequest {
|
||||
}
|
||||
}
|
||||
|
||||
public function files(string $key) : mixed
|
||||
public function files(string $key, mixed $value = null) : mixed
|
||||
{
|
||||
if ($value)
|
||||
{
|
||||
$this->_get[$key] = $value;
|
||||
}
|
||||
|
||||
if (isset($this->_files[$key]))
|
||||
{
|
||||
return $this->_files[$key];
|
||||
@ -54,8 +69,13 @@ class AppModelRequest {
|
||||
}
|
||||
}
|
||||
|
||||
public function server(string $key) : mixed
|
||||
public function server(string $key, mixed $value = null) : mixed
|
||||
{
|
||||
if ($value)
|
||||
{
|
||||
$this->_get[$key] = $value;
|
||||
}
|
||||
|
||||
if (isset($this->_get[$key]))
|
||||
{
|
||||
return $this->_get[$key];
|
||||
|
Loading…
x
Reference in New Issue
Block a user