mappingRouter($routeCollector, __DIR__ . '/RouterPath.php', __NAMESPACE__); $this->setGlobalMode(true); $this->setRouterNotFoundCallBack(function (Request $request, Response $response) { $response->write('not found!'); return false; }); } }