Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / system / tests / modules / accept_header_routing_test / src / Routing / AcceptHeaderMatcher.php
index 1a3c61eafb673cad6fbb2e13efb80cc5cb1d899c..a90d4f4607c8ad527f86e95834aa4303b7b3f38a 100644 (file)
@@ -2,16 +2,15 @@
 
 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}
@@ -59,11 +58,4 @@ class AcceptHeaderMatcher implements RouteFilterInterface {
     throw new NotAcceptableHttpException('No route found for the specified formats ' . implode(' ', $acceptable_mime_types));
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function applies(Route $route) {
-    return TRUE;
-  }
-
 }