comparison vendor/symfony-cmf/routing/RedirectRouteInterface.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
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;
13
14 /**
15 * Document for redirection entries with the RedirectController.
16 *
17 * Defines additional methods needed by the RedirectController to redirect
18 * based on the route.
19 *
20 * This document may define (in order of precedence - the others can be empty):
21 *
22 * - uri: an absolute uri
23 * - routeName and routeParameters: to be used with the standard symfony router
24 * or a route entry in the routeParameters for the DynamicRouter. Precedency
25 * between these is determined by the order of the routers in the chain
26 * router.
27 *
28 * With standard Symfony routing, you can just use uri / routeName and a
29 * hashmap of parameters.
30 *
31 * For the dynamic router, you can return a RouteInterface instance in the
32 * field 'route' of the parameters.
33 *
34 * Note: getRedirectContent must return the redirect route itself for the
35 * integration with DynamicRouter to work.
36 *
37 * @author David Buchmann <david@liip.ch>
38 */
39 interface RedirectRouteInterface extends RouteObjectInterface
40 {
41 /**
42 * Get the absolute uri to redirect to external domains.
43 *
44 * If this is non-empty, the other methods won't be used.
45 *
46 * @return string target absolute uri
47 */
48 public function getUri();
49
50 /**
51 * Get the target route document this route redirects to.
52 *
53 * If non-null, it is added as route into the parameters, which will lead
54 * to have the generate call issued by the RedirectController to have
55 * the target route in the parameters.
56 *
57 * @return RouteObjectInterface the route this redirection points to
58 */
59 public function getRouteTarget();
60
61 /**
62 * Get the name of the target route for working with the symfony standard
63 * router.
64 *
65 * @return string target route name
66 */
67 public function getRouteName();
68
69 /**
70 * Whether this should be a permanent or temporary redirect.
71 *
72 * @return bool
73 */
74 public function isPermanent();
75
76 /**
77 * Get the parameters for the target route router::generate().
78 *
79 * Note that for the DynamicRouter, you return the target route
80 * document as field 'route' of the hashmap.
81 *
82 * @return array Information to build the route
83 */
84 public function getParameters();
85 }