class BcRoute
A backwards compatibility route.
When a route is deprecated for another one, and backwards compatibility is provided, then it's best practice to:
- not duplicate all route definition metadata, to instead have an "as empty as possible" route
- have an accompanying outbound route processor, that overwrites this empty route definition with the redirected route's definition.
Hierarchy
- class \Symfony\Component\Routing\Route implements \Symfony\Component\Routing\Serializable
- class \Drupal\Core\Routing\BcRoute extends \Symfony\Component\Routing\Route
Expanded class hierarchy of BcRoute
See also
\Drupal\rest\RouteProcessor\RestResourceGetRouteProcessorBC
File
-
core/
lib/ Drupal/ Core/ Routing/ BcRoute.php, line 19
Namespace
Drupal\Core\RoutingView source
class BcRoute extends Route {
/**
* {@inheritdoc}
*/
public function __construct() {
parent::__construct('');
$this->setOption('bc_route', TRUE);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
BcRoute::__construct | public | function | Constructor. | Overrides Route::__construct |
Route::$compiled | private | property | ||
Route::$condition | private | property | ||
Route::$defaults | private | property | ||
Route::$host | private | property | ||
Route::$methods | private | property | ||
Route::$options | private | property | ||
Route::$path | private | property | ||
Route::$requirements | private | property | ||
Route::$schemes | private | property | ||
Route::addDefaults | public | function | ||
Route::addOptions | public | function | ||
Route::addRequirements | public | function | ||
Route::compile | public | function | Compiles the route. | |
Route::extractInlineDefaultsAndRequirements | private | function | ||
Route::getCondition | public | function | ||
Route::getDefault | public | function | ||
Route::getDefaults | public | function | ||
Route::getHost | public | function | ||
Route::getMethods | public | function | Returns the uppercased HTTP methods this route is restricted to. So an empty array means that any method is allowed. |
|
Route::getOption | public | function | Returns the option value or null when not found. | |
Route::getOptions | public | function | ||
Route::getPath | public | function | ||
Route::getRequirement | public | function | ||
Route::getRequirements | public | function | ||
Route::getSchemes | public | function | Returns the lowercased schemes this route is restricted to. So an empty array means that any scheme is allowed. |
|
Route::hasDefault | public | function | ||
Route::hasOption | public | function | ||
Route::hasRequirement | public | function | ||
Route::hasScheme | public | function | Checks if a scheme requirement has been set. | |
Route::isLocalized | private | function | ||
Route::sanitizeRequirement | private | function | ||
Route::serialize | final public | function | @internal | |
Route::setCondition | public | function | ||
Route::setDefault | public | function | ||
Route::setDefaults | public | function | ||
Route::setHost | public | function | ||
Route::setMethods | public | function | Sets the HTTP methods (e.g. 'POST') this route is restricted to. So an empty array means that any method is allowed. |
|
Route::setOption | public | function | Sets an option value. | |
Route::setOptions | public | function | ||
Route::setPath | public | function | ||
Route::setRequirement | public | function | ||
Route::setRequirements | public | function | ||
Route::setSchemes | public | function | Sets the schemes (e.g. 'https') this route is restricted to. So an empty array means that any scheme is allowed. |
|
Route::unserialize | final public | function | @internal | |
Route::__serialize | public | function | ||
Route::__unserialize | public | function |