Merge pull request #246 from skipperbent/v3-development

V3 development
This commit is contained in:
Simon Sessingø
2017-07-18 11:28:19 +02:00
committed by GitHub
2 changed files with 5 additions and 10 deletions
+4 -1
View File
@@ -2,11 +2,14 @@
"name": "pecee/simple-router",
"description": "Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.",
"keywords": [
"router",
"router",
"routing",
"route",
"simple-php-router",
"laravel",
"pecee",
"route"
"php"
],
"license": "MIT",
"support": {
+1 -9
View File
@@ -283,15 +283,7 @@ class Input
}
}
$output = array_merge($_GET, $output);
if ($filter !== null) {
$output = array_filter($output, function ($key) use ($filter) {
return (in_array($key, $filter) === true);
}, ARRAY_FILTER_USE_KEY);
}
return $output;
return ($filter !== null) ? array_intersect_key($output, array_flip($filter)) : array_merge($_GET, $output);
}
}