芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/lot.mgaplay.com.br/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php
staticRouteMap[$httpMethod][$uri])) { $handler = $this->staticRouteMap[$httpMethod][$uri]; return [self::FOUND, $handler, []]; } $varRouteData = $this->variableRouteData; if (isset($varRouteData[$httpMethod])) { $result = $this->dispatchVariableRoute($varRouteData[$httpMethod], $uri); if ($result[0] === self::FOUND) { return $result; } } // For HEAD requests, attempt fallback to GET if ($httpMethod === 'HEAD') { if (isset($this->staticRouteMap['GET'][$uri])) { $handler = $this->staticRouteMap['GET'][$uri]; return [self::FOUND, $handler, []]; } if (isset($varRouteData['GET'])) { $result = $this->dispatchVariableRoute($varRouteData['GET'], $uri); if ($result[0] === self::FOUND) { return $result; } } } // If nothing else matches, try fallback routes if (isset($this->staticRouteMap['*'][$uri])) { $handler = $this->staticRouteMap['*'][$uri]; return [self::FOUND, $handler, []]; } if (isset($varRouteData['*'])) { $result = $this->dispatchVariableRoute($varRouteData['*'], $uri); if ($result[0] === self::FOUND) { return $result; } } // Find allowed methods for this URI by matching against all other HTTP methods as well $allowedMethods = []; foreach ($this->staticRouteMap as $method => $uriMap) { if ($method !== $httpMethod && isset($uriMap[$uri])) { $allowedMethods[] = $method; } } foreach ($varRouteData as $method => $routeData) { if ($method === $httpMethod) { continue; } $result = $this->dispatchVariableRoute($routeData, $uri); if ($result[0] === self::FOUND) { $allowedMethods[] = $method; } } // If there are no allowed methods the route simply does not exist if ($allowedMethods) { return [self::METHOD_NOT_ALLOWED, $allowedMethods]; } return [self::NOT_FOUND]; } }