public function removeRoute($path) { $routeName = ltrim($path, '/'); if (!isset($this->routes[$routeName])) { return false; } unset($this->routes[$routeName]); return true; }