Errors and exceptions handling, #16
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@122 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -25,7 +25,7 @@ class Router
|
||||
|
||||
public function add($name, $route, $action, $params = null, $layout = null)
|
||||
{
|
||||
if (! $layout) {
|
||||
if (!$layout) {
|
||||
$layout = $this->default_layout;
|
||||
}
|
||||
$this->routes[$name] = new Route($route, $action, $params, $layout);
|
||||
@ -37,8 +37,9 @@ class Router
|
||||
|
||||
foreach ($this->routes as $name => $route) {
|
||||
if ($route->match($req)) {
|
||||
$this->route_name = $route;
|
||||
$this->route_name = $name;
|
||||
$this->route = $route;
|
||||
Env::setParams($route->getParams());
|
||||
return $this->route;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user