comparison vendor/symfony-cmf/routing/Enhancer/RouteEnhancerInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 /*
4 * This file is part of the Symfony CMF package.
5 *
6 * (c) 2011-2015 Symfony CMF
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Cmf\Component\Routing\Enhancer;
13
14 use Symfony\Component\HttpFoundation\Request;
15
16 /**
17 * A route enhancer can change the values in the route data arrays.
18 *
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.
22 *
23 * @author David Buchmann
24 */
25 interface RouteEnhancerInterface
26 {
27 /**
28 * Update the defaults based on its own data and the request.
29 *
30 * @param array $defaults the getRouteDefaults array.
31 * @param Request $request the Request instance.
32 *
33 * @return array the modified defaults. Each enhancer MUST return the
34 * $defaults but may add or remove values.
35 */
36 public function enhance(array $defaults, Request $request);
37 }