mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
@@ -200,6 +200,11 @@ class Router
|
|||||||
*/
|
*/
|
||||||
public function loadRoutes()
|
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 */
|
/* Initialize boot-managers */
|
||||||
/* @var $manager IRouterBootManager */
|
/* @var $manager IRouterBootManager */
|
||||||
foreach ($this->bootManagers as $manager) {
|
foreach ($this->bootManagers as $manager) {
|
||||||
|
|||||||
@@ -48,11 +48,6 @@ class SimpleRouter
|
|||||||
*/
|
*/
|
||||||
public static function start()
|
public static function start()
|
||||||
{
|
{
|
||||||
// Stop processing routes if no valid route is found.
|
|
||||||
if(static::request()->getUrl()->getPath() === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo static::router()->routeRequest();
|
echo static::router()->routeRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user