mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Development
- Changed router so it supports both string and object as exception handlers. - Added `Router::error($callback)` method to `Router` class (issue #238). - Fixed issues calling `getController` and `getMethod` when callback is an object (issue #239). - Updated documentation to reflect new changes. - Added `addExceptionHandler` to `IGroupRoute` interface and `RouteGroup` class. - Other minor bugfixes and optimisations.
This commit is contained in:
@@ -74,8 +74,10 @@ class RouteController extends LoadableRoute implements IControllerRoute
|
||||
$method .= '/';
|
||||
}
|
||||
|
||||
if ($this->getGroup() !== null && count($this->getGroup()->getDomains()) > 0) {
|
||||
$url .= '//' . $this->getGroup()->getDomains()[0];
|
||||
$group = $this->getGroup();
|
||||
|
||||
if ($group !== null && count($group->getDomains()) > 0) {
|
||||
$url .= '//' . $group->getDomains()[0];
|
||||
}
|
||||
|
||||
$url .= '/' . trim($this->getUrl(), '/') . '/' . strtolower($method) . join('/', $parameters);
|
||||
|
||||
Reference in New Issue
Block a user