|
|
@ -5,12 +5,14 @@ class AppModelRequest { |
|
|
|
private array $_get; |
|
|
|
private array $_get; |
|
|
|
private array $_post; |
|
|
|
private array $_post; |
|
|
|
private array $_files; |
|
|
|
private array $_files; |
|
|
|
|
|
|
|
private array $_server; |
|
|
|
|
|
|
|
|
|
|
|
public function __construct(array $get, array $post, array $files) |
|
|
|
public function __construct(array $get, array $post, array $files, array $server) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->_get = $get; |
|
|
|
$this->_get = $get; |
|
|
|
$this->_post = $post; |
|
|
|
$this->_post = $post; |
|
|
|
$this->_files = $files; |
|
|
|
$this->_files = $files; |
|
|
|
|
|
|
|
$this->_server = $server; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function get(string $key) : mixed |
|
|
|
public function get(string $key) : mixed |
|
|
@ -52,6 +54,19 @@ class AppModelRequest { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function server(string $key) : mixed |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (isset($this->_get[$key])) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->_get[$key]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function hasPost() : bool |
|
|
|
public function hasPost() : bool |
|
|
|
{ |
|
|
|
{ |
|
|
|
return !empty($this->_post); |
|
|
|
return !empty($this->_post); |
|
|
|