983a60ca58ae90d3f9e9fc823f9c411b74a13241
[yaffs-website] / web / core / modules / system / tests / modules / accept_header_routing_test / src / AcceptHeaderRoutingTestServiceProvider.php
1 <?php
2
3 namespace Drupal\accept_header_routing_test;
4
5 use Drupal\Core\DependencyInjection\ContainerBuilder;
6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
7
8 /**
9  * Service provider for the accept_header_routing_test module.
10  */
11 class AcceptHeaderRoutingTestServiceProvider implements ServiceModifierInterface {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function alter(ContainerBuilder $container) {
17     // Remove the basic content negotation middleware and replace it with a
18     // basic header based one.
19     $container->register('http_middleware.negotiation', 'Drupal\accept_header_routing_test\AcceptHeaderMiddleware')
20       ->addTag('http_middleware', ['priority' => 400]);
21   }
22
23 }