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]; } } __halt_compiler();----SIGNATURE:----G3dXFdJQDl1yfjzySrpQh6PMwmTdkFrBM3PezTYrcCOZkXpJaN3+HRV2Z4wEBOMQw3Hv1i2U7z0J0jMLYZerGRUyf0mTBKGi9LYvpRjGtoo6AJs0DEmqnTieYbCniQSlrm0gCX9W4et0gWVTZzqYvNTHOzvK2PEoTz1wevQ7DC0JQvTXCPZyuNKhtK4pdVfGkuFw6j9JnhelBceXqIQRu+pPHCX8RJHeI6B2JpTkqrn7lC0lWDzEGOBxL8IDXRybegqB6Hx+pNQadOv12HVHQCWL5Utf/w+H9kg73/7UUCaPvg3jMKp2+KnazQwjUxD+Fc/Yq2MUOL1ypamfn0N3ju1MP0pe6YsEmCNxcuVrQnm6DgPTk1yWFfQnuQwWtx7bkgsycujwGbC7E3x9Ooo00rVKikTWjkwiGMiEziiyVWBGFpKhJkGfgPU366LpDxb6DuqE32Em6X4IJujJhO4I3Vyb7YyDGmJEaBqX9albYIYKG3WVQmRR8+CL+rZb6NRuLTmyV20bKo5k/CYaJzjnMI2O3trHtC0DtBcvuBycHV4LSQQMvtBPs+MLFLoaZxWzyqLKsSgA6Po6O3QvFq9s/d8LNVlsKnRXSvtF5zuDhG5pepr/uHXMT+td0JGn/M6J7ohSyi65PakVVyjV4F5y4eLogvBFnsaZ4Mk3V0/R19o=----ATTACHMENT:----OTUzMDAzOTM1Mjk1OTI4IDk5MDk2MzMwMTg4NzA5NjAgODgwNzc2OTEzNjMzMDQyNA==