mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
mvc:request - allow mixed for $defaultValue so we can pass strings or arrays
This commit is contained in:
parent
cad058ef24
commit
abec7c49be
@ -111,7 +111,7 @@ class Request
|
||||
return isset($_POST[$name]);
|
||||
}
|
||||
|
||||
public function getPost(?string $name = null, ?string $filter = null, ?string $defaultValue = null)
|
||||
public function getPost(?string $name = null, ?string $filter = null, mixed $defaultValue = null)
|
||||
{
|
||||
if ($name === null) {
|
||||
$value = $_POST;
|
||||
@ -124,7 +124,7 @@ class Request
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function get(?string $name = null, ?string $filter = null, ?string $defaultValue = null)
|
||||
public function get(?string $name = null, ?string $filter = null, mixed $defaultValue = null)
|
||||
{
|
||||
if ($name === null) {
|
||||
$value = $_REQUEST;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user