Refactoring.

This commit is contained in:
Taylor Otwell 2011-08-01 17:09:10 -05:00
parent bc7df55f92
commit 716a957e93
1 changed files with 6 additions and 1 deletions

View File

@ -37,7 +37,12 @@ public function load($uri)
{ {
$base = require $this->path.'routes'.EXT; $base = require $this->path.'routes'.EXT;
return (is_dir($this->path.'routes') and $uri != '') ? array_merge($this->load_nested_routes($uri), $base) : $base; if ( ! is_dir($this->path.'routes') or $uri == '')
{
return $base;
}
return array_merge($this->load_nested_routes($uri), $base);
} }
/** /**