diff --git a/app/libs/tool/RouteManager.php b/app/libs/tool/RouteManager.php index e502f16..1554737 100644 --- a/app/libs/tool/RouteManager.php +++ b/app/libs/tool/RouteManager.php @@ -15,16 +15,16 @@ class RouteManager { /** * @return static */ - public static function getInstance() { + public static function getInstance($routeConfigPath = null) { if (empty(self::$instance)) { - self::$instance = new self; + self::$instance = new self($routeConfigPath); } return self::$instance; } - private function __construct() { + private function __construct($routeConfigPath = null) { $this->request = Request::getInstance(); - $this->routeConfigPath = APP_PATH . '/routes'; + $this->routeConfigPath = $routeConfigPath ?: APP_PATH . '/routes'; $this->initRoutes(); }