20240120-ljl-routeConfig
ljl 10 months ago
parent 35a6805838
commit a35d833533

@ -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();
}

Loading…
Cancel
Save