[FEATURE] Changed behavior for default-namespace after issue #446

- Router::setDefaultNamespace() no longer has to be set in the beginning of routes.php.
- Default namespace are now set once the router is started (Router::start()).
- [WIP] Added unit-tests for custom-namespaces.
This commit is contained in:
Simon Sessingø
2021-03-22 16:41:20 +01:00
parent 11fffd9a7b
commit fd585e8b9d
3 changed files with 41 additions and 21 deletions
+1 -1
View File
@@ -319,7 +319,7 @@ class InputHandler
public function all(array $filter = []): array
{
$output = $this->originalParams + $this->originalPost + $this->originalFile;
$output = (\count($filter) > 0) ? array_intersect_key($output, array_flip($filter)) : $output;
$output = (\count($filter) > 0) ? \array_intersect_key($output, \array_flip($filter)) : $output;
foreach ($filter as $filterKey) {
if (array_key_exists($filterKey, $output) === false) {