mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-07 18:29:59 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0dbc4e6ba2 | |||
| 6d7d07669b | |||
| a4dfa59a66 | |||
| 98bf95bfc9 | |||
| b051bcf02b | |||
| b8d5106f4e | |||
| 2c9d996437 | |||
| cfc9ac138a |
@@ -217,7 +217,7 @@ class Request
|
||||
*/
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = is_string($url) ? new Url($url) : $url;
|
||||
$this->url = ($url instanceof Url) ? $url : new Url($url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -200,6 +200,11 @@ class Router
|
||||
*/
|
||||
public function loadRoutes()
|
||||
{
|
||||
// Stop processing routes if no valid route is found.
|
||||
if($this->request->getRewriteRoute() === null && $this->request->getUrl() === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialize boot-managers */
|
||||
/* @var $manager IRouterBootManager */
|
||||
foreach ($this->bootManagers as $manager) {
|
||||
|
||||
Reference in New Issue
Block a user