mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
@@ -93,7 +93,9 @@ class Input
|
|||||||
|
|
||||||
$path = $original[$property];
|
$path = $original[$property];
|
||||||
|
|
||||||
foreach (array_values($index) as $i) {
|
$fileValues = array_values($index);
|
||||||
|
|
||||||
|
foreach ($fileValues as $i) {
|
||||||
$path = $path[$i];
|
$path = $path[$i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ class RouteResource extends LoadableRoute implements IControllerRoute
|
|||||||
|
|
||||||
public function findUrl($method = null, $parameters = null, $name = null)
|
public function findUrl($method = null, $parameters = null, $name = null)
|
||||||
{
|
{
|
||||||
$method = array_search($name, $this->names, false);
|
$url = array_search($name, $this->names, false);
|
||||||
if ($method !== false) {
|
if ($url !== false) {
|
||||||
return rtrim($this->url . $this->urls[$method], '/') . '/';
|
return rtrim($this->url . $this->urls[$url], '/') . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->url;
|
return $this->url;
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ class Router
|
|||||||
* @param array $routes
|
* @param array $routes
|
||||||
* @param IGroupRoute|null $group
|
* @param IGroupRoute|null $group
|
||||||
* @param IRoute|null $parent
|
* @param IRoute|null $parent
|
||||||
|
* @throws NotFoundHttpException
|
||||||
*/
|
*/
|
||||||
protected function processRoutes(array $routes, IGroupRoute $group = null, IRoute $parent = null)
|
protected function processRoutes(array $routes, IGroupRoute $group = null, IRoute $parent = null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user