4 * This file is part of the Symfony CMF package.
6 * (c) 2011-2015 Symfony CMF
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Cmf\Component\Routing\Enhancer;
14 use Symfony\Component\HttpFoundation\Request;
17 * A route enhancer can change the values in the route data arrays.
19 * This is useful to provide information to the rest of the routing system
20 * that can be inferred from other parameters rather than hardcode that
21 * information in every route.
23 * @author David Buchmann
25 interface RouteEnhancerInterface
28 * Update the defaults based on its own data and the request.
30 * @param array $defaults the getRouteDefaults array.
31 * @param Request $request the Request instance.
33 * @return array the modified defaults. Each enhancer MUST return the
34 * $defaults but may add or remove values.
36 public function enhance(array $defaults, Request $request);