namespace Drupal\accept_header_routing_test\Routing;
-use Drupal\Core\Routing\RouteFilterInterface;
+use Drupal\Core\Routing\FilterInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
-use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**
* Filters routes based on the media type specified in the HTTP Accept headers.
*/
-class AcceptHeaderMatcher implements RouteFilterInterface {
+class AcceptHeaderMatcher implements FilterInterface {
/**
* {@inheritdoc}
throw new NotAcceptableHttpException('No route found for the specified formats ' . implode(' ', $acceptable_mime_types));
}
- /**
- * {@inheritdoc}
- */
- public function applies(Route $route) {
- return TRUE;
- }
-
}