1
0
mirror of https://github.com/dannyvankooten/AltoRouter.git synced 2025-08-03 23:17:38 +02:00

Update AltoRouter.php

Added function getRoutes(). Often it's nice to process routes or display them without extending AltoRouter.
This commit is contained in:
Sebastian Pöll
2014-12-19 15:26:51 +01:00
parent a7a6b99ac8
commit 009f163c3d

View File

@@ -26,7 +26,15 @@ class AltoRouter {
$this->setBasePath($basePath);
$this->addMatchTypes($matchTypes);
}
/**
* Retrieves all routes.
* Useful if you want to process or display routes.
*/
public function getRoutes() {
return $this->routes;
}
/**
* Add multiple routes at once from array in the following format:
*
@@ -46,7 +54,7 @@ class AltoRouter {
call_user_func_array(array($this, 'map'), $route);
}
}
/**
* Set the base path.
* Useful if you are running your application from a subdirectory.