mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 21:02:15 +00:00
Cleanup
This commit is contained in:
@@ -94,8 +94,7 @@ class Input
|
|||||||
|
|
||||||
$path = $original[$property];
|
$path = $original[$property];
|
||||||
|
|
||||||
$tmp = array_values($index);
|
foreach (array_values($index) as $i) {
|
||||||
foreach ($tmp as $i) {
|
|
||||||
$path = $path[$i];
|
$path = $path[$i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ abstract class LoadableRoute extends Route implements ILoadableRoute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function matchRegex(Request $request, $url) {
|
public function matchRegex(Request $request, $url)
|
||||||
|
{
|
||||||
|
|
||||||
/* Match on custom defined regular expression */
|
/* Match on custom defined regular expression */
|
||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ abstract class Route implements IRoute
|
|||||||
public function getParameters()
|
public function getParameters()
|
||||||
{
|
{
|
||||||
/* Sort the parameters after the user-defined param order, if any */
|
/* Sort the parameters after the user-defined param order, if any */
|
||||||
$parameters = array();
|
$parameters = [];
|
||||||
|
|
||||||
if (count($this->originalParameters) > 0) {
|
if (count($this->originalParameters) > 0) {
|
||||||
$parameters = $this->originalParameters;
|
$parameters = $this->originalParameters;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class RouteGroup extends Route implements IGroupRoute
|
|||||||
if ($parameters !== null && count($parameters) > 0) {
|
if ($parameters !== null && count($parameters) > 0) {
|
||||||
|
|
||||||
$this->parameters = $parameters;
|
$this->parameters = $parameters;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user