e6a76587919bdb493bdaec5654e51e60d0d64c5b
[yaffs-website] / web / core / lib / Drupal / Core / Routing / BcRoute.php
1 <?php
2
3 namespace Drupal\Core\Routing;
4
5 use Symfony\Component\Routing\Route;
6
7 /**
8  * A backwards compatibility route.
9  *
10  * When a route is deprecated for another one, and backwards compatibility is
11  * provided, then it's best practice to:
12  * - not duplicate all route definition metadata, to instead have an "as empty
13  *   as possible" route
14  * - have an accompanying outbound route processor, that overwrites this empty
15  *   route definition with the redirected route's definition.
16  *
17  * @see \Drupal\rest\RouteProcessor\RestResourceGetRouteProcessorBC
18  */
19 class BcRoute extends Route {
20
21   /**
22    * {@inheritdoc}
23    */
24   public function __construct() {
25     parent::__construct('');
26     $this->setOption('bc_route', TRUE);
27   }
28
29 }