File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
src/Symfony/Bundle/FrameworkBundle Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 1616 <parameter key =" router.options.generator_class" >Symfony\Component\Routing\Generator\UrlGenerator</parameter >
1717 <parameter key =" router.options.generator_base_class" >Symfony\Component\Routing\Generator\UrlGenerator</parameter >
1818 <parameter key =" router.options.generator_dumper_class" >Symfony\Component\Routing\Generator\Dumper\PhpGeneratorDumper</parameter >
19- <parameter key =" router.options.matcher_class" >Symfony\Component\ Routing\Matcher\UrlMatcher </parameter >
20- <parameter key =" router.options.matcher_base_class" >Symfony\Component\ Routing\Matcher\UrlMatcher </parameter >
19+ <parameter key =" router.options.matcher_class" >Symfony\Bundle\FrameworkBundle\ Routing\RedirectableUrlMatcher </parameter >
20+ <parameter key =" router.options.matcher_base_class" >Symfony\Bundle\FrameworkBundle\ Routing\RedirectableUrlMatcher </parameter >
2121 <parameter key =" router.options.matcher_dumper_class" >Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper</parameter >
2222 <parameter key =" router.cache_warmer.class" >Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer</parameter >
2323 <parameter key =" router.options.matcher.cache_class" >%kernel.name%%kernel.environment%UrlMatcher</parameter >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Symfony package.
5+ *
6+ * (c) Fabien Potencier <fabien@symfony.com>
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 \Bundle \FrameworkBundle \Routing ;
13+
14+ use Symfony \Component \Routing \Matcher \UrlMatcher ;
15+ use Symfony \Component \Routing \Matcher \RedirectableUrlMatcherInterface ;
16+
17+ /**
18+ * @author Fabien Potencier <fabien@symfony.com>
19+ */
20+ class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface
21+ {
22+ public function redirect ($ pathinfo , $ route )
23+ {
24+ return array (
25+ '_controller ' => 'Symfony \\Bundle \\FrameworkBundle \\Controller \\RedirectController::urlRedirectAction ' ,
26+ 'url ' => $ this ->context ['base_url ' ].$ pathinfo ,
27+ 'permanent ' => true ,
28+ '_route ' => $ route ,
29+ );
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments