protected function getAllowedMethods($uri)
{
try {
$route = $this->requestMatcher->matchRequest(Request::create($uri, 'OPTIONS'));
if (isset($route['allowedMethods'])) {
return explode(',', $route['allowedMethods']);
}
} catch (ResourceNotFoundException $e) {
// the provider doesn't care about a not found
} catch (MethodNotAllowedException $e) {
// neither does it care about a method not allowed
}
return array();
}