mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 22:02:15 +00:00
Merge pull request #194 from skipperbent/v2-development
Input optimisations
This commit is contained in:
@@ -51,7 +51,7 @@ class Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Parse get requests */
|
/* Parse get requests */
|
||||||
$this->parseFiles();
|
$this->file = $this->parseFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parseFiles()
|
public function parseFiles()
|
||||||
@@ -73,7 +73,13 @@ class Input
|
|||||||
|
|
||||||
$keys = [];
|
$keys = [];
|
||||||
|
|
||||||
$list = array_merge_recursive($list, [$key => $this->rearrangeFiles($value['name'], $keys, $value)]);
|
$files = $this->rearrangeFiles($value['name'], $keys, $value);
|
||||||
|
|
||||||
|
if (isset($list[$key])) {
|
||||||
|
$list[$key][] = $files;
|
||||||
|
} else {
|
||||||
|
$list[$key] = $files;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,8 +115,6 @@ class Input
|
|||||||
'filename' => $getItem($key, 'name'),
|
'filename' => $getItem($key, 'name'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$output = array_merge_recursive($output, [$key => $file]);
|
|
||||||
|
|
||||||
if (isset($output[$key])) {
|
if (isset($output[$key])) {
|
||||||
$output[$key][] = $file;
|
$output[$key][] = $file;
|
||||||
} else {
|
} else {
|
||||||
@@ -121,7 +125,14 @@ class Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
$index[] = $key;
|
$index[] = $key;
|
||||||
$output = array_merge_recursive($output, [$key => $this->rearrangeFiles($value, $index, $original)]);
|
|
||||||
|
$files = $this->rearrangeFiles($value, $index, $original);
|
||||||
|
|
||||||
|
if (isset($output[$key])) {
|
||||||
|
$output[$key][] = $files;
|
||||||
|
} else {
|
||||||
|
$output[$key] = $files;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user