Fixes and development

- `$parameter` argument in `findUrl` method now supports both string,
array and null value to avoid confusion.

- Using return value in callbacks now displays value (issue: #257)
This commit is contained in:
Simon Sessingø
2017-08-13 03:06:27 +01:00
parent 6aa38cfa4c
commit 74187ee326
5 changed files with 23 additions and 14 deletions
+2 -4
View File
@@ -76,9 +76,7 @@ abstract class Route implements IRoute
if (is_callable($callback) === true) {
/* When the callback is a function */
call_user_func_array($callback, $this->getParameters());
return;
return call_user_func_array($callback, $this->getParameters());
}
@@ -106,7 +104,7 @@ abstract class Route implements IRoute
});
}
call_user_func_array([$class, $method], $parameters);
return call_user_func_array([$class, $method], $parameters);
}
protected function parseParameters($route, $url, $parameterRegex = null)