mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-02-02 10:04: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;
|
$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]))
|
if (isset($this->_get[$key]))
|
||||||
{
|
{
|
||||||
return $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]))
|
if (isset($this->_post[$key]))
|
||||||
{
|
{
|
||||||
return $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]))
|
if (isset($this->_files[$key]))
|
||||||
{
|
{
|
||||||
return $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]))
|
if (isset($this->_get[$key]))
|
||||||
{
|
{
|
||||||
return $this->_get[$key];
|
return $this->_get[$key];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user