mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-22 11:09:16 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 18a9df56ca | |||
| f7af53a9af | |||
| 6b8351f1b8 |
@@ -55,16 +55,18 @@ class Input {
|
||||
return $element;
|
||||
}
|
||||
|
||||
$element = $this->post->findFirst($index);
|
||||
if(request()->getMethod() !== 'get') {
|
||||
|
||||
if($element !== null) {
|
||||
return $element;
|
||||
}
|
||||
$element = $this->post->findFirst($index);
|
||||
|
||||
$element = $this->file->findFirst($index);
|
||||
if ($element !== null) {
|
||||
return $element;
|
||||
}
|
||||
|
||||
if($element !== null) {
|
||||
return $element;
|
||||
$element = $this->file->findFirst($index);
|
||||
if ($element !== null) {
|
||||
return $element;
|
||||
}
|
||||
}
|
||||
|
||||
return $default;
|
||||
@@ -85,6 +87,10 @@ class Input {
|
||||
|
||||
if($item !== null) {
|
||||
|
||||
if($item instanceof InputFile) {
|
||||
return $item;
|
||||
}
|
||||
|
||||
if (is_array($item->getValue())) {
|
||||
return ($key !== null && isset($item->getValue()[$key])) ? $item->getValue()[$key] : $item->getValue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user