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