updated packages
This commit is contained in:
@@ -13,4 +13,9 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses;
|
||||
|
||||
abstract class AbstractClass
|
||||
{
|
||||
abstract public function abstractRouteAction();
|
||||
|
||||
public function routeAction($arg1, $arg2 = 'defaultValue2', $arg3 = 'defaultValue3')
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,12 @@ class DefaultValueController
|
||||
public function action($default = 'value')
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/hello/{name<\w+>}", name="hello_without_default")
|
||||
* @Route("/hello/{name<\w+>?Symfony}", name="hello_with_default")
|
||||
*/
|
||||
public function hello(string $name = 'World')
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@ class CustomRouteCompiler extends RouteCompiler
|
||||
*/
|
||||
public static function compile(Route $route)
|
||||
{
|
||||
return new CustomCompiledRoute('', '', array(), array());
|
||||
return new CustomCompiledRoute('', '', [], []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatche
|
||||
{
|
||||
public function redirect($path, $route, $scheme = null)
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'_controller' => 'Some controller reference...',
|
||||
'path' => $path,
|
||||
'scheme' => $scheme,
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="routing.xml">
|
||||
<default key="_controller">FrameworkBundle:Template:template</default>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="routing.xml" controller="FrameworkBundle:Template:template" />
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="routing.xml" controller="FrameworkBundle:Template:template">
|
||||
<default key="_controller">AppBundle:Blog:index</default>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="app_blog" path="/blog" controller="AppBundle:Homepage:show">
|
||||
<default key="_controller">AppBundle:Blog:index</default>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="app_homepage" path="/" controller="AppBundle:Homepage:show" />
|
||||
|
||||
|
||||
@@ -15,26 +15,26 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->matchHost = true;
|
||||
$this->staticRoutes = array(
|
||||
'/test/baz' => array(array(array('_route' => 'baz'), null, null, null, false, false, null)),
|
||||
'/test/baz.html' => array(array(array('_route' => 'baz2'), null, null, null, false, false, null)),
|
||||
'/test/baz3' => array(array(array('_route' => 'baz3'), null, null, null, true, false, null)),
|
||||
'/foofoo' => array(array(array('_route' => 'foofoo', 'def' => 'test'), null, null, null, false, false, null)),
|
||||
'/spa ce' => array(array(array('_route' => 'space'), null, null, null, false, false, null)),
|
||||
'/multi/new' => array(array(array('_route' => 'overridden2'), null, null, null, false, false, null)),
|
||||
'/multi/hey' => array(array(array('_route' => 'hey'), null, null, null, true, false, null)),
|
||||
'/ababa' => array(array(array('_route' => 'ababa'), null, null, null, false, false, null)),
|
||||
'/route1' => array(array(array('_route' => 'route1'), 'a.example.com', null, null, false, false, null)),
|
||||
'/c2/route2' => array(array(array('_route' => 'route2'), 'a.example.com', null, null, false, false, null)),
|
||||
'/route4' => array(array(array('_route' => 'route4'), 'a.example.com', null, null, false, false, null)),
|
||||
'/c2/route3' => array(array(array('_route' => 'route3'), 'b.example.com', null, null, false, false, null)),
|
||||
'/route5' => array(array(array('_route' => 'route5'), 'c.example.com', null, null, false, false, null)),
|
||||
'/route6' => array(array(array('_route' => 'route6'), null, null, null, false, false, null)),
|
||||
'/route11' => array(array(array('_route' => 'route11'), '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null)),
|
||||
'/route12' => array(array(array('_route' => 'route12', 'var1' => 'val'), '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null)),
|
||||
'/route17' => array(array(array('_route' => 'route17'), null, null, null, false, false, null)),
|
||||
);
|
||||
$this->regexpList = array(
|
||||
$this->staticRoutes = [
|
||||
'/test/baz' => [[['_route' => 'baz'], null, null, null, false, false, null]],
|
||||
'/test/baz.html' => [[['_route' => 'baz2'], null, null, null, false, false, null]],
|
||||
'/test/baz3' => [[['_route' => 'baz3'], null, null, null, true, false, null]],
|
||||
'/foofoo' => [[['_route' => 'foofoo', 'def' => 'test'], null, null, null, false, false, null]],
|
||||
'/spa ce' => [[['_route' => 'space'], null, null, null, false, false, null]],
|
||||
'/multi/new' => [[['_route' => 'overridden2'], null, null, null, false, false, null]],
|
||||
'/multi/hey' => [[['_route' => 'hey'], null, null, null, true, false, null]],
|
||||
'/ababa' => [[['_route' => 'ababa'], null, null, null, false, false, null]],
|
||||
'/route1' => [[['_route' => 'route1'], 'a.example.com', null, null, false, false, null]],
|
||||
'/c2/route2' => [[['_route' => 'route2'], 'a.example.com', null, null, false, false, null]],
|
||||
'/route4' => [[['_route' => 'route4'], 'a.example.com', null, null, false, false, null]],
|
||||
'/c2/route3' => [[['_route' => 'route3'], 'b.example.com', null, null, false, false, null]],
|
||||
'/route5' => [[['_route' => 'route5'], 'c.example.com', null, null, false, false, null]],
|
||||
'/route6' => [[['_route' => 'route6'], null, null, null, false, false, null]],
|
||||
'/route11' => [[['_route' => 'route11'], '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null]],
|
||||
'/route12' => [[['_route' => 'route12', 'var1' => 'val'], '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null]],
|
||||
'/route17' => [[['_route' => 'route17'], null, null, null, false, false, null]],
|
||||
];
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|(?:(?:[^./]*+\\.)++)(?'
|
||||
.'|/foo/(baz|symfony)(*:47)'
|
||||
@@ -81,33 +81,33 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
.')'
|
||||
.')'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
47 => array(array(array('_route' => 'foo', 'def' => 'test'), array('bar'), null, null, false, true, null)),
|
||||
70 => array(array(array('_route' => 'bar'), array('foo'), array('GET' => 0, 'HEAD' => 1), null, false, true, null)),
|
||||
90 => array(array(array('_route' => 'barhead'), array('foo'), array('GET' => 0), null, false, true, null)),
|
||||
115 => array(
|
||||
array(array('_route' => 'baz4'), array('foo'), null, null, true, true, null),
|
||||
array(array('_route' => 'baz5'), array('foo'), array('POST' => 0), null, true, true, null),
|
||||
array(array('_route' => 'baz.baz6'), array('foo'), array('PUT' => 0), null, true, true, null),
|
||||
),
|
||||
131 => array(array(array('_route' => 'quoter'), array('quoter'), null, null, false, true, null)),
|
||||
160 => array(array(array('_route' => 'foo1'), array('foo'), array('PUT' => 0), null, false, true, null)),
|
||||
168 => array(array(array('_route' => 'bar1'), array('bar'), null, null, false, true, null)),
|
||||
181 => array(array(array('_route' => 'overridden'), array('var'), null, null, false, true, null)),
|
||||
204 => array(array(array('_route' => 'foo2'), array('foo1'), null, null, false, true, null)),
|
||||
212 => array(array(array('_route' => 'bar2'), array('bar1'), null, null, false, true, null)),
|
||||
248 => array(array(array('_route' => 'helloWorld', 'who' => 'World!'), array('who'), null, null, false, true, null)),
|
||||
279 => array(array(array('_route' => 'foo3'), array('_locale', 'foo'), null, null, false, true, null)),
|
||||
287 => array(array(array('_route' => 'bar3'), array('_locale', 'bar'), null, null, false, true, null)),
|
||||
309 => array(array(array('_route' => 'foo4'), array('foo'), null, null, false, true, null)),
|
||||
371 => array(array(array('_route' => 'route13'), array('var1', 'name'), null, null, false, true, null)),
|
||||
389 => array(array(array('_route' => 'route14', 'var1' => 'val'), array('var1', 'name'), null, null, false, true, null)),
|
||||
441 => array(array(array('_route' => 'route15'), array('name'), null, null, false, true, null)),
|
||||
489 => array(array(array('_route' => 'route16', 'var1' => 'val'), array('name'), null, null, false, true, null)),
|
||||
510 => array(array(array('_route' => 'a'), array(), null, null, false, false, null)),
|
||||
531 => array(array(array('_route' => 'b'), array('var'), null, null, false, true, null)),
|
||||
549 => array(array(array('_route' => 'c'), array('var'), null, null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
47 => [[['_route' => 'foo', 'def' => 'test'], ['bar'], null, null, false, true, null]],
|
||||
70 => [[['_route' => 'bar'], ['foo'], ['GET' => 0, 'HEAD' => 1], null, false, true, null]],
|
||||
90 => [[['_route' => 'barhead'], ['foo'], ['GET' => 0], null, false, true, null]],
|
||||
115 => [
|
||||
[['_route' => 'baz4'], ['foo'], null, null, true, true, null],
|
||||
[['_route' => 'baz5'], ['foo'], ['POST' => 0], null, true, true, null],
|
||||
[['_route' => 'baz.baz6'], ['foo'], ['PUT' => 0], null, true, true, null],
|
||||
],
|
||||
131 => [[['_route' => 'quoter'], ['quoter'], null, null, false, true, null]],
|
||||
160 => [[['_route' => 'foo1'], ['foo'], ['PUT' => 0], null, false, true, null]],
|
||||
168 => [[['_route' => 'bar1'], ['bar'], null, null, false, true, null]],
|
||||
181 => [[['_route' => 'overridden'], ['var'], null, null, false, true, null]],
|
||||
204 => [[['_route' => 'foo2'], ['foo1'], null, null, false, true, null]],
|
||||
212 => [[['_route' => 'bar2'], ['bar1'], null, null, false, true, null]],
|
||||
248 => [[['_route' => 'helloWorld', 'who' => 'World!'], ['who'], null, null, false, true, null]],
|
||||
279 => [[['_route' => 'foo3'], ['_locale', 'foo'], null, null, false, true, null]],
|
||||
287 => [[['_route' => 'bar3'], ['_locale', 'bar'], null, null, false, true, null]],
|
||||
309 => [[['_route' => 'foo4'], ['foo'], null, null, false, true, null]],
|
||||
371 => [[['_route' => 'route13'], ['var1', 'name'], null, null, false, true, null]],
|
||||
389 => [[['_route' => 'route14', 'var1' => 'val'], ['var1', 'name'], null, null, false, true, null]],
|
||||
441 => [[['_route' => 'route15'], ['name'], null, null, false, true, null]],
|
||||
489 => [[['_route' => 'route16', 'var1' => 'val'], ['name'], null, null, false, true, null]],
|
||||
510 => [[['_route' => 'a'], [], null, null, false, false, null]],
|
||||
531 => [[['_route' => 'b'], ['var'], null, null, false, true, null]],
|
||||
549 => [[['_route' => 'c'], ['var'], null, null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->regexpList = array(
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/(en|fr)/(?'
|
||||
.'|admin/post(?'
|
||||
@@ -45,22 +45,22 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
.')'
|
||||
.'|/(en|fr)?(*:264)'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
32 => array(array(array('_route' => 'a', '_locale' => 'en'), array('_locale'), null, null, true, false, null)),
|
||||
46 => array(array(array('_route' => 'b', '_locale' => 'en'), array('_locale'), null, null, false, false, null)),
|
||||
58 => array(array(array('_route' => 'c', '_locale' => 'en'), array('_locale', 'id'), null, null, false, true, null)),
|
||||
75 => array(array(array('_route' => 'd', '_locale' => 'en'), array('_locale', 'id'), null, null, false, false, null)),
|
||||
94 => array(array(array('_route' => 'e', '_locale' => 'en'), array('_locale', 'id'), null, null, false, false, null)),
|
||||
110 => array(array(array('_route' => 'f', '_locale' => 'en'), array('_locale'), null, null, true, false, null)),
|
||||
130 => array(array(array('_route' => 'g', '_locale' => 'en'), array('_locale'), null, null, false, false, null)),
|
||||
154 => array(array(array('_route' => 'h', '_locale' => 'en'), array('_locale', 'page'), null, null, false, true, null)),
|
||||
175 => array(array(array('_route' => 'i', '_locale' => 'en'), array('_locale', 'page'), null, null, false, true, null)),
|
||||
202 => array(array(array('_route' => 'j', '_locale' => 'en'), array('_locale', 'id'), null, null, false, false, null)),
|
||||
216 => array(array(array('_route' => 'k', '_locale' => 'en'), array('_locale'), null, null, false, false, null)),
|
||||
234 => array(array(array('_route' => 'l', '_locale' => 'en'), array('_locale'), null, null, false, false, null)),
|
||||
245 => array(array(array('_route' => 'm', '_locale' => 'en'), array('_locale'), null, null, false, false, null)),
|
||||
264 => array(array(array('_route' => 'n', '_locale' => 'en'), array('_locale'), null, null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
32 => [[['_route' => 'a', '_locale' => 'en'], ['_locale'], null, null, true, false, null]],
|
||||
46 => [[['_route' => 'b', '_locale' => 'en'], ['_locale'], null, null, false, false, null]],
|
||||
58 => [[['_route' => 'c', '_locale' => 'en'], ['_locale', 'id'], null, null, false, true, null]],
|
||||
75 => [[['_route' => 'd', '_locale' => 'en'], ['_locale', 'id'], null, null, false, false, null]],
|
||||
94 => [[['_route' => 'e', '_locale' => 'en'], ['_locale', 'id'], null, null, false, false, null]],
|
||||
110 => [[['_route' => 'f', '_locale' => 'en'], ['_locale'], null, null, true, false, null]],
|
||||
130 => [[['_route' => 'g', '_locale' => 'en'], ['_locale'], null, null, false, false, null]],
|
||||
154 => [[['_route' => 'h', '_locale' => 'en'], ['_locale', 'page'], null, null, false, true, null]],
|
||||
175 => [[['_route' => 'i', '_locale' => 'en'], ['_locale', 'page'], null, null, false, true, null]],
|
||||
202 => [[['_route' => 'j', '_locale' => 'en'], ['_locale', 'id'], null, null, false, false, null]],
|
||||
216 => [[['_route' => 'k', '_locale' => 'en'], ['_locale'], null, null, false, false, null]],
|
||||
234 => [[['_route' => 'l', '_locale' => 'en'], ['_locale'], null, null, false, false, null]],
|
||||
245 => [[['_route' => 'm', '_locale' => 'en'], ['_locale'], null, null, false, false, null]],
|
||||
264 => [[['_route' => 'n', '_locale' => 'en'], ['_locale'], null, null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->regexpList = array(
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/abc([^/]++)/(?'
|
||||
.'|1(?'
|
||||
@@ -33,14 +33,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
.')'
|
||||
.')'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
27 => array(array(array('_route' => 'r1'), array('foo'), null, null, false, false, null)),
|
||||
38 => array(array(array('_route' => 'r10'), array('foo'), null, null, false, false, null)),
|
||||
46 => array(array(array('_route' => 'r100'), array('foo'), null, null, false, false, null)),
|
||||
59 => array(array(array('_route' => 'r2'), array('foo'), null, null, false, false, null)),
|
||||
70 => array(array(array('_route' => 'r20'), array('foo'), null, null, false, false, null)),
|
||||
78 => array(array(array('_route' => 'r200'), array('foo'), null, null, false, false, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
27 => [[['_route' => 'r1'], ['foo'], null, null, false, false, null]],
|
||||
38 => [[['_route' => 'r10'], ['foo'], null, null, false, false, null]],
|
||||
46 => [[['_route' => 'r100'], ['foo'], null, null, false, false, null]],
|
||||
59 => [[['_route' => 'r2'], ['foo'], null, null, false, false, null]],
|
||||
70 => [[['_route' => 'r20'], ['foo'], null, null, false, false, null]],
|
||||
78 => [[['_route' => 'r200'], ['foo'], null, null, false, false, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->matchHost = true;
|
||||
$this->regexpList = array(
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|(?i:([^\\.]++)\\.exampple\\.com)\\.(?'
|
||||
.'|/abc([^/]++)(?'
|
||||
@@ -23,12 +23,12 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
.')'
|
||||
.')'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
56 => array(
|
||||
array(array('_route' => 'r1'), array('foo', 'foo'), null, null, false, true, null),
|
||||
array(array('_route' => 'r2'), array('foo', 'foo'), null, null, false, true, null),
|
||||
),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
56 => [
|
||||
[['_route' => 'r1'], ['foo', 'foo'], null, null, false, true, null],
|
||||
[['_route' => 'r2'], ['foo', 'foo'], null, null, false, true, null],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,28 +15,28 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->matchHost = true;
|
||||
$this->staticRoutes = array(
|
||||
'/test/baz' => array(array(array('_route' => 'baz'), null, null, null, false, false, null)),
|
||||
'/test/baz.html' => array(array(array('_route' => 'baz2'), null, null, null, false, false, null)),
|
||||
'/test/baz3' => array(array(array('_route' => 'baz3'), null, null, null, true, false, null)),
|
||||
'/foofoo' => array(array(array('_route' => 'foofoo', 'def' => 'test'), null, null, null, false, false, null)),
|
||||
'/spa ce' => array(array(array('_route' => 'space'), null, null, null, false, false, null)),
|
||||
'/multi/new' => array(array(array('_route' => 'overridden2'), null, null, null, false, false, null)),
|
||||
'/multi/hey' => array(array(array('_route' => 'hey'), null, null, null, true, false, null)),
|
||||
'/ababa' => array(array(array('_route' => 'ababa'), null, null, null, false, false, null)),
|
||||
'/route1' => array(array(array('_route' => 'route1'), 'a.example.com', null, null, false, false, null)),
|
||||
'/c2/route2' => array(array(array('_route' => 'route2'), 'a.example.com', null, null, false, false, null)),
|
||||
'/route4' => array(array(array('_route' => 'route4'), 'a.example.com', null, null, false, false, null)),
|
||||
'/c2/route3' => array(array(array('_route' => 'route3'), 'b.example.com', null, null, false, false, null)),
|
||||
'/route5' => array(array(array('_route' => 'route5'), 'c.example.com', null, null, false, false, null)),
|
||||
'/route6' => array(array(array('_route' => 'route6'), null, null, null, false, false, null)),
|
||||
'/route11' => array(array(array('_route' => 'route11'), '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null)),
|
||||
'/route12' => array(array(array('_route' => 'route12', 'var1' => 'val'), '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null)),
|
||||
'/route17' => array(array(array('_route' => 'route17'), null, null, null, false, false, null)),
|
||||
'/secure' => array(array(array('_route' => 'secure'), null, null, array('https' => 0), false, false, null)),
|
||||
'/nonsecure' => array(array(array('_route' => 'nonsecure'), null, null, array('http' => 0), false, false, null)),
|
||||
);
|
||||
$this->regexpList = array(
|
||||
$this->staticRoutes = [
|
||||
'/test/baz' => [[['_route' => 'baz'], null, null, null, false, false, null]],
|
||||
'/test/baz.html' => [[['_route' => 'baz2'], null, null, null, false, false, null]],
|
||||
'/test/baz3' => [[['_route' => 'baz3'], null, null, null, true, false, null]],
|
||||
'/foofoo' => [[['_route' => 'foofoo', 'def' => 'test'], null, null, null, false, false, null]],
|
||||
'/spa ce' => [[['_route' => 'space'], null, null, null, false, false, null]],
|
||||
'/multi/new' => [[['_route' => 'overridden2'], null, null, null, false, false, null]],
|
||||
'/multi/hey' => [[['_route' => 'hey'], null, null, null, true, false, null]],
|
||||
'/ababa' => [[['_route' => 'ababa'], null, null, null, false, false, null]],
|
||||
'/route1' => [[['_route' => 'route1'], 'a.example.com', null, null, false, false, null]],
|
||||
'/c2/route2' => [[['_route' => 'route2'], 'a.example.com', null, null, false, false, null]],
|
||||
'/route4' => [[['_route' => 'route4'], 'a.example.com', null, null, false, false, null]],
|
||||
'/c2/route3' => [[['_route' => 'route3'], 'b.example.com', null, null, false, false, null]],
|
||||
'/route5' => [[['_route' => 'route5'], 'c.example.com', null, null, false, false, null]],
|
||||
'/route6' => [[['_route' => 'route6'], null, null, null, false, false, null]],
|
||||
'/route11' => [[['_route' => 'route11'], '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null]],
|
||||
'/route12' => [[['_route' => 'route12', 'var1' => 'val'], '#^(?P<var1>[^\\.]++)\\.example\\.com$#sDi', null, null, false, false, null]],
|
||||
'/route17' => [[['_route' => 'route17'], null, null, null, false, false, null]],
|
||||
'/secure' => [[['_route' => 'secure'], null, null, ['https' => 0], false, false, null]],
|
||||
'/nonsecure' => [[['_route' => 'nonsecure'], null, null, ['http' => 0], false, false, null]],
|
||||
];
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|(?:(?:[^./]*+\\.)++)(?'
|
||||
.'|/foo/(baz|symfony)(*:47)'
|
||||
@@ -83,33 +83,33 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
.')'
|
||||
.')'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
47 => array(array(array('_route' => 'foo', 'def' => 'test'), array('bar'), null, null, false, true, null)),
|
||||
70 => array(array(array('_route' => 'bar'), array('foo'), array('GET' => 0, 'HEAD' => 1), null, false, true, null)),
|
||||
90 => array(array(array('_route' => 'barhead'), array('foo'), array('GET' => 0), null, false, true, null)),
|
||||
115 => array(
|
||||
array(array('_route' => 'baz4'), array('foo'), null, null, true, true, null),
|
||||
array(array('_route' => 'baz5'), array('foo'), array('POST' => 0), null, true, true, null),
|
||||
array(array('_route' => 'baz.baz6'), array('foo'), array('PUT' => 0), null, true, true, null),
|
||||
),
|
||||
131 => array(array(array('_route' => 'quoter'), array('quoter'), null, null, false, true, null)),
|
||||
160 => array(array(array('_route' => 'foo1'), array('foo'), array('PUT' => 0), null, false, true, null)),
|
||||
168 => array(array(array('_route' => 'bar1'), array('bar'), null, null, false, true, null)),
|
||||
181 => array(array(array('_route' => 'overridden'), array('var'), null, null, false, true, null)),
|
||||
204 => array(array(array('_route' => 'foo2'), array('foo1'), null, null, false, true, null)),
|
||||
212 => array(array(array('_route' => 'bar2'), array('bar1'), null, null, false, true, null)),
|
||||
248 => array(array(array('_route' => 'helloWorld', 'who' => 'World!'), array('who'), null, null, false, true, null)),
|
||||
279 => array(array(array('_route' => 'foo3'), array('_locale', 'foo'), null, null, false, true, null)),
|
||||
287 => array(array(array('_route' => 'bar3'), array('_locale', 'bar'), null, null, false, true, null)),
|
||||
309 => array(array(array('_route' => 'foo4'), array('foo'), null, null, false, true, null)),
|
||||
371 => array(array(array('_route' => 'route13'), array('var1', 'name'), null, null, false, true, null)),
|
||||
389 => array(array(array('_route' => 'route14', 'var1' => 'val'), array('var1', 'name'), null, null, false, true, null)),
|
||||
441 => array(array(array('_route' => 'route15'), array('name'), null, null, false, true, null)),
|
||||
489 => array(array(array('_route' => 'route16', 'var1' => 'val'), array('name'), null, null, false, true, null)),
|
||||
510 => array(array(array('_route' => 'a'), array(), null, null, false, false, null)),
|
||||
531 => array(array(array('_route' => 'b'), array('var'), null, null, false, true, null)),
|
||||
549 => array(array(array('_route' => 'c'), array('var'), null, null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
47 => [[['_route' => 'foo', 'def' => 'test'], ['bar'], null, null, false, true, null]],
|
||||
70 => [[['_route' => 'bar'], ['foo'], ['GET' => 0, 'HEAD' => 1], null, false, true, null]],
|
||||
90 => [[['_route' => 'barhead'], ['foo'], ['GET' => 0], null, false, true, null]],
|
||||
115 => [
|
||||
[['_route' => 'baz4'], ['foo'], null, null, true, true, null],
|
||||
[['_route' => 'baz5'], ['foo'], ['POST' => 0], null, true, true, null],
|
||||
[['_route' => 'baz.baz6'], ['foo'], ['PUT' => 0], null, true, true, null],
|
||||
],
|
||||
131 => [[['_route' => 'quoter'], ['quoter'], null, null, false, true, null]],
|
||||
160 => [[['_route' => 'foo1'], ['foo'], ['PUT' => 0], null, false, true, null]],
|
||||
168 => [[['_route' => 'bar1'], ['bar'], null, null, false, true, null]],
|
||||
181 => [[['_route' => 'overridden'], ['var'], null, null, false, true, null]],
|
||||
204 => [[['_route' => 'foo2'], ['foo1'], null, null, false, true, null]],
|
||||
212 => [[['_route' => 'bar2'], ['bar1'], null, null, false, true, null]],
|
||||
248 => [[['_route' => 'helloWorld', 'who' => 'World!'], ['who'], null, null, false, true, null]],
|
||||
279 => [[['_route' => 'foo3'], ['_locale', 'foo'], null, null, false, true, null]],
|
||||
287 => [[['_route' => 'bar3'], ['_locale', 'bar'], null, null, false, true, null]],
|
||||
309 => [[['_route' => 'foo4'], ['foo'], null, null, false, true, null]],
|
||||
371 => [[['_route' => 'route13'], ['var1', 'name'], null, null, false, true, null]],
|
||||
389 => [[['_route' => 'route14', 'var1' => 'val'], ['var1', 'name'], null, null, false, true, null]],
|
||||
441 => [[['_route' => 'route15'], ['name'], null, null, false, true, null]],
|
||||
489 => [[['_route' => 'route16', 'var1' => 'val'], ['name'], null, null, false, true, null]],
|
||||
510 => [[['_route' => 'a'], [], null, null, false, false, null]],
|
||||
531 => [[['_route' => 'b'], ['var'], null, null, false, true, null]],
|
||||
549 => [[['_route' => 'c'], ['var'], null, null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,18 +14,18 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->staticRoutes = array(
|
||||
'/rootprefix/test' => array(array(array('_route' => 'static'), null, null, null, false, false, null)),
|
||||
'/with-condition' => array(array(array('_route' => 'with-condition'), null, null, null, false, false, -1)),
|
||||
);
|
||||
$this->regexpList = array(
|
||||
$this->staticRoutes = [
|
||||
'/rootprefix/test' => [[['_route' => 'static'], null, null, null, false, false, null]],
|
||||
'/with-condition' => [[['_route' => 'with-condition'], null, null, null, false, false, -1]],
|
||||
];
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/rootprefix/([^/]++)(*:27)'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
27 => array(array(array('_route' => 'dynamic'), array('var'), null, null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
27 => [[['_route' => 'dynamic'], ['var'], null, null, false, true, null]],
|
||||
];
|
||||
$this->checkCondition = static function ($condition, $context, $request) {
|
||||
switch ($condition) {
|
||||
case -1: return ($context->getMethod() == "GET");
|
||||
|
||||
@@ -14,15 +14,15 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->staticRoutes = array(
|
||||
'/just_head' => array(array(array('_route' => 'just_head'), null, array('HEAD' => 0), null, false, false, null)),
|
||||
'/head_and_get' => array(array(array('_route' => 'head_and_get'), null, array('HEAD' => 0, 'GET' => 1), null, false, false, null)),
|
||||
'/get_and_head' => array(array(array('_route' => 'get_and_head'), null, array('GET' => 0, 'HEAD' => 1), null, false, false, null)),
|
||||
'/post_and_head' => array(array(array('_route' => 'post_and_head'), null, array('POST' => 0, 'HEAD' => 1), null, false, false, null)),
|
||||
'/put_and_post' => array(
|
||||
array(array('_route' => 'put_and_post'), null, array('PUT' => 0, 'POST' => 1), null, false, false, null),
|
||||
array(array('_route' => 'put_and_get_and_head'), null, array('PUT' => 0, 'GET' => 1, 'HEAD' => 2), null, false, false, null),
|
||||
),
|
||||
);
|
||||
$this->staticRoutes = [
|
||||
'/just_head' => [[['_route' => 'just_head'], null, ['HEAD' => 0], null, false, false, null]],
|
||||
'/head_and_get' => [[['_route' => 'head_and_get'], null, ['HEAD' => 0, 'GET' => 1], null, false, false, null]],
|
||||
'/get_and_head' => [[['_route' => 'get_and_head'], null, ['GET' => 0, 'HEAD' => 1], null, false, false, null]],
|
||||
'/post_and_head' => [[['_route' => 'post_and_head'], null, ['POST' => 0, 'HEAD' => 1], null, false, false, null]],
|
||||
'/put_and_post' => [
|
||||
[['_route' => 'put_and_post'], null, ['PUT' => 0, 'POST' => 1], null, false, false, null],
|
||||
[['_route' => 'put_and_get_and_head'], null, ['PUT' => 0, 'GET' => 1, 'HEAD' => 2], null, false, false, null],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,29 +14,29 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->staticRoutes = array(
|
||||
'/a/11' => array(array(array('_route' => 'a_first'), null, null, null, false, false, null)),
|
||||
'/a/22' => array(array(array('_route' => 'a_second'), null, null, null, false, false, null)),
|
||||
'/a/333' => array(array(array('_route' => 'a_third'), null, null, null, false, false, null)),
|
||||
'/a/44' => array(array(array('_route' => 'a_fourth'), null, null, null, true, false, null)),
|
||||
'/a/55' => array(array(array('_route' => 'a_fifth'), null, null, null, true, false, null)),
|
||||
'/a/66' => array(array(array('_route' => 'a_sixth'), null, null, null, true, false, null)),
|
||||
'/nested/group/a' => array(array(array('_route' => 'nested_a'), null, null, null, true, false, null)),
|
||||
'/nested/group/b' => array(array(array('_route' => 'nested_b'), null, null, null, true, false, null)),
|
||||
'/nested/group/c' => array(array(array('_route' => 'nested_c'), null, null, null, true, false, null)),
|
||||
'/slashed/group' => array(array(array('_route' => 'slashed_a'), null, null, null, true, false, null)),
|
||||
'/slashed/group/b' => array(array(array('_route' => 'slashed_b'), null, null, null, true, false, null)),
|
||||
'/slashed/group/c' => array(array(array('_route' => 'slashed_c'), null, null, null, true, false, null)),
|
||||
);
|
||||
$this->regexpList = array(
|
||||
$this->staticRoutes = [
|
||||
'/a/11' => [[['_route' => 'a_first'], null, null, null, false, false, null]],
|
||||
'/a/22' => [[['_route' => 'a_second'], null, null, null, false, false, null]],
|
||||
'/a/333' => [[['_route' => 'a_third'], null, null, null, false, false, null]],
|
||||
'/a/44' => [[['_route' => 'a_fourth'], null, null, null, true, false, null]],
|
||||
'/a/55' => [[['_route' => 'a_fifth'], null, null, null, true, false, null]],
|
||||
'/a/66' => [[['_route' => 'a_sixth'], null, null, null, true, false, null]],
|
||||
'/nested/group/a' => [[['_route' => 'nested_a'], null, null, null, true, false, null]],
|
||||
'/nested/group/b' => [[['_route' => 'nested_b'], null, null, null, true, false, null]],
|
||||
'/nested/group/c' => [[['_route' => 'nested_c'], null, null, null, true, false, null]],
|
||||
'/slashed/group' => [[['_route' => 'slashed_a'], null, null, null, true, false, null]],
|
||||
'/slashed/group/b' => [[['_route' => 'slashed_b'], null, null, null, true, false, null]],
|
||||
'/slashed/group/c' => [[['_route' => 'slashed_c'], null, null, null, true, false, null]],
|
||||
];
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/([^/]++)(*:16)'
|
||||
.'|/nested/([^/]++)(*:39)'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
16 => array(array(array('_route' => 'a_wildcard'), array('param'), null, null, false, true, null)),
|
||||
39 => array(array(array('_route' => 'nested_wildcard'), array('param'), null, null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
16 => [[['_route' => 'a_wildcard'], ['param'], null, null, false, true, null]],
|
||||
39 => [[['_route' => 'nested_wildcard'], ['param'], null, null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,17 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->staticRoutes = array(
|
||||
'/trailing/simple/no-methods' => array(array(array('_route' => 'simple_trailing_slash_no_methods'), null, null, null, true, false, null)),
|
||||
'/trailing/simple/get-method' => array(array(array('_route' => 'simple_trailing_slash_GET_method'), null, array('GET' => 0), null, true, false, null)),
|
||||
'/trailing/simple/head-method' => array(array(array('_route' => 'simple_trailing_slash_HEAD_method'), null, array('HEAD' => 0), null, true, false, null)),
|
||||
'/trailing/simple/post-method' => array(array(array('_route' => 'simple_trailing_slash_POST_method'), null, array('POST' => 0), null, true, false, null)),
|
||||
'/not-trailing/simple/no-methods' => array(array(array('_route' => 'simple_not_trailing_slash_no_methods'), null, null, null, false, false, null)),
|
||||
'/not-trailing/simple/get-method' => array(array(array('_route' => 'simple_not_trailing_slash_GET_method'), null, array('GET' => 0), null, false, false, null)),
|
||||
'/not-trailing/simple/head-method' => array(array(array('_route' => 'simple_not_trailing_slash_HEAD_method'), null, array('HEAD' => 0), null, false, false, null)),
|
||||
'/not-trailing/simple/post-method' => array(array(array('_route' => 'simple_not_trailing_slash_POST_method'), null, array('POST' => 0), null, false, false, null)),
|
||||
);
|
||||
$this->regexpList = array(
|
||||
$this->staticRoutes = [
|
||||
'/trailing/simple/no-methods' => [[['_route' => 'simple_trailing_slash_no_methods'], null, null, null, true, false, null]],
|
||||
'/trailing/simple/get-method' => [[['_route' => 'simple_trailing_slash_GET_method'], null, ['GET' => 0], null, true, false, null]],
|
||||
'/trailing/simple/head-method' => [[['_route' => 'simple_trailing_slash_HEAD_method'], null, ['HEAD' => 0], null, true, false, null]],
|
||||
'/trailing/simple/post-method' => [[['_route' => 'simple_trailing_slash_POST_method'], null, ['POST' => 0], null, true, false, null]],
|
||||
'/not-trailing/simple/no-methods' => [[['_route' => 'simple_not_trailing_slash_no_methods'], null, null, null, false, false, null]],
|
||||
'/not-trailing/simple/get-method' => [[['_route' => 'simple_not_trailing_slash_GET_method'], null, ['GET' => 0], null, false, false, null]],
|
||||
'/not-trailing/simple/head-method' => [[['_route' => 'simple_not_trailing_slash_HEAD_method'], null, ['HEAD' => 0], null, false, false, null]],
|
||||
'/not-trailing/simple/post-method' => [[['_route' => 'simple_not_trailing_slash_POST_method'], null, ['POST' => 0], null, false, false, null]],
|
||||
];
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/trailing/regex/(?'
|
||||
.'|no\\-methods/([^/]++)(*:46)'
|
||||
@@ -39,16 +39,16 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
.'|post\\-method/([^/]++)(*:269)'
|
||||
.')'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
46 => array(array(array('_route' => 'regex_trailing_slash_no_methods'), array('param'), null, null, true, true, null)),
|
||||
73 => array(array(array('_route' => 'regex_trailing_slash_GET_method'), array('param'), array('GET' => 0), null, true, true, null)),
|
||||
101 => array(array(array('_route' => 'regex_trailing_slash_HEAD_method'), array('param'), array('HEAD' => 0), null, true, true, null)),
|
||||
130 => array(array(array('_route' => 'regex_trailing_slash_POST_method'), array('param'), array('POST' => 0), null, true, true, null)),
|
||||
183 => array(array(array('_route' => 'regex_not_trailing_slash_no_methods'), array('param'), null, null, false, true, null)),
|
||||
211 => array(array(array('_route' => 'regex_not_trailing_slash_GET_method'), array('param'), array('GET' => 0), null, false, true, null)),
|
||||
240 => array(array(array('_route' => 'regex_not_trailing_slash_HEAD_method'), array('param'), array('HEAD' => 0), null, false, true, null)),
|
||||
269 => array(array(array('_route' => 'regex_not_trailing_slash_POST_method'), array('param'), array('POST' => 0), null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
46 => [[['_route' => 'regex_trailing_slash_no_methods'], ['param'], null, null, true, true, null]],
|
||||
73 => [[['_route' => 'regex_trailing_slash_GET_method'], ['param'], ['GET' => 0], null, true, true, null]],
|
||||
101 => [[['_route' => 'regex_trailing_slash_HEAD_method'], ['param'], ['HEAD' => 0], null, true, true, null]],
|
||||
130 => [[['_route' => 'regex_trailing_slash_POST_method'], ['param'], ['POST' => 0], null, true, true, null]],
|
||||
183 => [[['_route' => 'regex_not_trailing_slash_no_methods'], ['param'], null, null, false, true, null]],
|
||||
211 => [[['_route' => 'regex_not_trailing_slash_GET_method'], ['param'], ['GET' => 0], null, false, true, null]],
|
||||
240 => [[['_route' => 'regex_not_trailing_slash_HEAD_method'], ['param'], ['HEAD' => 0], null, false, true, null]],
|
||||
269 => [[['_route' => 'regex_not_trailing_slash_POST_method'], ['param'], ['POST' => 0], null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,17 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->staticRoutes = array(
|
||||
'/trailing/simple/no-methods' => array(array(array('_route' => 'simple_trailing_slash_no_methods'), null, null, null, true, false, null)),
|
||||
'/trailing/simple/get-method' => array(array(array('_route' => 'simple_trailing_slash_GET_method'), null, array('GET' => 0), null, true, false, null)),
|
||||
'/trailing/simple/head-method' => array(array(array('_route' => 'simple_trailing_slash_HEAD_method'), null, array('HEAD' => 0), null, true, false, null)),
|
||||
'/trailing/simple/post-method' => array(array(array('_route' => 'simple_trailing_slash_POST_method'), null, array('POST' => 0), null, true, false, null)),
|
||||
'/not-trailing/simple/no-methods' => array(array(array('_route' => 'simple_not_trailing_slash_no_methods'), null, null, null, false, false, null)),
|
||||
'/not-trailing/simple/get-method' => array(array(array('_route' => 'simple_not_trailing_slash_GET_method'), null, array('GET' => 0), null, false, false, null)),
|
||||
'/not-trailing/simple/head-method' => array(array(array('_route' => 'simple_not_trailing_slash_HEAD_method'), null, array('HEAD' => 0), null, false, false, null)),
|
||||
'/not-trailing/simple/post-method' => array(array(array('_route' => 'simple_not_trailing_slash_POST_method'), null, array('POST' => 0), null, false, false, null)),
|
||||
);
|
||||
$this->regexpList = array(
|
||||
$this->staticRoutes = [
|
||||
'/trailing/simple/no-methods' => [[['_route' => 'simple_trailing_slash_no_methods'], null, null, null, true, false, null]],
|
||||
'/trailing/simple/get-method' => [[['_route' => 'simple_trailing_slash_GET_method'], null, ['GET' => 0], null, true, false, null]],
|
||||
'/trailing/simple/head-method' => [[['_route' => 'simple_trailing_slash_HEAD_method'], null, ['HEAD' => 0], null, true, false, null]],
|
||||
'/trailing/simple/post-method' => [[['_route' => 'simple_trailing_slash_POST_method'], null, ['POST' => 0], null, true, false, null]],
|
||||
'/not-trailing/simple/no-methods' => [[['_route' => 'simple_not_trailing_slash_no_methods'], null, null, null, false, false, null]],
|
||||
'/not-trailing/simple/get-method' => [[['_route' => 'simple_not_trailing_slash_GET_method'], null, ['GET' => 0], null, false, false, null]],
|
||||
'/not-trailing/simple/head-method' => [[['_route' => 'simple_not_trailing_slash_HEAD_method'], null, ['HEAD' => 0], null, false, false, null]],
|
||||
'/not-trailing/simple/post-method' => [[['_route' => 'simple_not_trailing_slash_POST_method'], null, ['POST' => 0], null, false, false, null]],
|
||||
];
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/trailing/regex/(?'
|
||||
.'|no\\-methods/([^/]++)(*:46)'
|
||||
@@ -39,16 +39,16 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
|
||||
.'|post\\-method/([^/]++)(*:269)'
|
||||
.')'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
46 => array(array(array('_route' => 'regex_trailing_slash_no_methods'), array('param'), null, null, true, true, null)),
|
||||
73 => array(array(array('_route' => 'regex_trailing_slash_GET_method'), array('param'), array('GET' => 0), null, true, true, null)),
|
||||
101 => array(array(array('_route' => 'regex_trailing_slash_HEAD_method'), array('param'), array('HEAD' => 0), null, true, true, null)),
|
||||
130 => array(array(array('_route' => 'regex_trailing_slash_POST_method'), array('param'), array('POST' => 0), null, true, true, null)),
|
||||
183 => array(array(array('_route' => 'regex_not_trailing_slash_no_methods'), array('param'), null, null, false, true, null)),
|
||||
211 => array(array(array('_route' => 'regex_not_trailing_slash_GET_method'), array('param'), array('GET' => 0), null, false, true, null)),
|
||||
240 => array(array(array('_route' => 'regex_not_trailing_slash_HEAD_method'), array('param'), array('HEAD' => 0), null, false, true, null)),
|
||||
269 => array(array(array('_route' => 'regex_not_trailing_slash_POST_method'), array('param'), array('POST' => 0), null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
46 => [[['_route' => 'regex_trailing_slash_no_methods'], ['param'], null, null, true, true, null]],
|
||||
73 => [[['_route' => 'regex_trailing_slash_GET_method'], ['param'], ['GET' => 0], null, true, true, null]],
|
||||
101 => [[['_route' => 'regex_trailing_slash_HEAD_method'], ['param'], ['HEAD' => 0], null, true, true, null]],
|
||||
130 => [[['_route' => 'regex_trailing_slash_POST_method'], ['param'], ['POST' => 0], null, true, true, null]],
|
||||
183 => [[['_route' => 'regex_not_trailing_slash_no_methods'], ['param'], null, null, false, true, null]],
|
||||
211 => [[['_route' => 'regex_not_trailing_slash_GET_method'], ['param'], ['GET' => 0], null, false, true, null]],
|
||||
240 => [[['_route' => 'regex_not_trailing_slash_HEAD_method'], ['param'], ['HEAD' => 0], null, false, true, null]],
|
||||
269 => [[['_route' => 'regex_not_trailing_slash_POST_method'], ['param'], ['POST' => 0], null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->regexpList = array(
|
||||
$this->regexpList = [
|
||||
0 => '{^(?'
|
||||
.'|/(a)(*:11)'
|
||||
.')/?$}sD',
|
||||
@@ -24,11 +24,11 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
22 => '{^(?'
|
||||
.'|/(.)(*:33)'
|
||||
.')/?$}sD',
|
||||
);
|
||||
$this->dynamicRoutes = array(
|
||||
11 => array(array(array('_route' => 'a'), array('a'), null, null, false, true, null)),
|
||||
22 => array(array(array('_route' => 'b'), array('a'), null, null, false, true, null)),
|
||||
33 => array(array(array('_route' => 'c'), array('a'), null, null, false, true, null)),
|
||||
);
|
||||
];
|
||||
$this->dynamicRoutes = [
|
||||
11 => [[['_route' => 'a'], ['a'], null, null, false, true, null]],
|
||||
22 => [[['_route' => 'b'], ['a'], null, null, false, true, null]],
|
||||
33 => [[['_route' => 'c'], ['a'], null, null, false, true, null]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->matchHost = true;
|
||||
$this->staticRoutes = array(
|
||||
'/' => array(
|
||||
array(array('_route' => 'a'), '#^(?P<d>[^\\.]++)\\.e\\.c\\.b\\.a$#sDi', null, null, false, false, null),
|
||||
array(array('_route' => 'c'), '#^(?P<e>[^\\.]++)\\.e\\.c\\.b\\.a$#sDi', null, null, false, false, null),
|
||||
array(array('_route' => 'b'), 'd.c.b.a', null, null, false, false, null),
|
||||
),
|
||||
);
|
||||
$this->staticRoutes = [
|
||||
'/' => [
|
||||
[['_route' => 'a'], '#^(?P<d>[^\\.]++)\\.e\\.c\\.b\\.a$#sDi', null, null, false, false, null],
|
||||
[['_route' => 'c'], '#^(?P<e>[^\\.]++)\\.e\\.c\\.b\\.a$#sDi', null, null, false, false, null],
|
||||
[['_route' => 'b'], 'd.c.b.a', null, null, false, false, null],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="bar_route" path="/bar" controller="AppBundle:Bar:view" />
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="baz_route" path="/baz" controller="AppBundle:Baz:view" />
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="ba?.xml" />
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="b?r.xml" />
|
||||
</routes>
|
||||
|
||||
@@ -6,7 +6,7 @@ return function (RoutingConfigurator $routes) {
|
||||
$collection = $routes->collection();
|
||||
|
||||
$collection->add('bar_route', '/bar')
|
||||
->defaults(array('_controller' => 'AppBundle:Bar:view'));
|
||||
->defaults(['_controller' => 'AppBundle:Bar:view']);
|
||||
|
||||
return $collection;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ return function (RoutingConfigurator $routes) {
|
||||
$collection = $routes->collection();
|
||||
|
||||
$collection->add('baz_route', '/baz')
|
||||
->defaults(array('_controller' => 'AppBundle:Baz:view'));
|
||||
->defaults(['_controller' => 'AppBundle:Baz:view']);
|
||||
|
||||
return $collection;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="../controller/routing.xml" />
|
||||
<import resource="../controller/routing.xml" prefix="/api" name-prefix="api_" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="../controller/routing.xml" prefix="/slash" name-prefix="a_" />
|
||||
<import resource="../controller/routing.xml" prefix="/no-slash" name-prefix="b_" trailing-slash-on-root="false" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="localized">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
<route id="imported" path="/suffix">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
</route>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
<route id="imported">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
<path locale="en">/suffix</path>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
<import resource="./imported-with-locale-but-not-localized.xml">
|
||||
<prefix locale="fr">/le-prefix</prefix>
|
||||
<prefix locale="en">/the-prefix</prefix>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
<import resource="./imported-with-locale.xml">
|
||||
<prefix locale="fr">/le-prefix</prefix>
|
||||
<prefix locale="en">/the-prefix</prefix>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route path="/test"></route>
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="myroute"></route>
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<r:routes xmlns:r="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<r:route id="blog_show" path="/blog/{slug}" host="{_locale}.example.com">
|
||||
<r:default key="_controller">MyBundle:Blog:show</r:default>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<foo>bar</foo>
|
||||
</routes>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}">
|
||||
<default key="foo" xsi:nil="true" />
|
||||
|
||||
@@ -7,13 +7,13 @@ return function (RoutingConfigurator $routes) {
|
||||
->collection()
|
||||
->add('foo', '/foo')
|
||||
->condition('abc')
|
||||
->options(array('utf8' => true))
|
||||
->options(['utf8' => true])
|
||||
->add('buz', 'zub')
|
||||
->controller('foo:act');
|
||||
|
||||
$routes->import('php_dsl_sub.php')
|
||||
->prefix('/sub')
|
||||
->requirements(array('id' => '\d+'));
|
||||
->requirements(['id' => '\d+']);
|
||||
|
||||
$routes->import('php_dsl_sub.php')
|
||||
->namePrefix('z_')
|
||||
@@ -23,7 +23,7 @@ return function (RoutingConfigurator $routes) {
|
||||
->prefix('/bus', false);
|
||||
|
||||
$routes->add('ouf', '/ouf')
|
||||
->schemes(array('https'))
|
||||
->methods(array('GET'))
|
||||
->defaults(array('id' => 0));
|
||||
->schemes(['https'])
|
||||
->methods(['GET'])
|
||||
->defaults(['id' => 0]);
|
||||
};
|
||||
|
||||
@@ -5,13 +5,13 @@ namespace Symfony\Component\Routing\Loader\Configurator;
|
||||
return function (RoutingConfigurator $routes) {
|
||||
$routes
|
||||
->collection()
|
||||
->prefix(array('en' => '/glish'))
|
||||
->prefix(['en' => '/glish'])
|
||||
->add('foo', '/foo')
|
||||
->add('bar', array('en' => '/bar'));
|
||||
->add('bar', ['en' => '/bar']);
|
||||
|
||||
$routes
|
||||
->add('baz', array('en' => '/baz'));
|
||||
->add('baz', ['en' => '/baz']);
|
||||
|
||||
$routes->import('php_dsl_sub_i18n.php')
|
||||
->prefix(array('fr' => '/ench'));
|
||||
->prefix(['fr' => '/ench']);
|
||||
};
|
||||
|
||||
@@ -6,6 +6,6 @@ return function (RoutingConfigurator $routes) {
|
||||
$add = $routes->collection('c_')
|
||||
->prefix('pub');
|
||||
|
||||
$add('foo', array('fr' => '/foo'));
|
||||
$add('bar', array('fr' => '/bar'));
|
||||
$add('foo', ['fr' => '/foo']);
|
||||
$add('bar', ['fr' => '/bar']);
|
||||
};
|
||||
|
||||
@@ -9,13 +9,13 @@ return new class() {
|
||||
->collection()
|
||||
->add('foo', '/foo')
|
||||
->condition('abc')
|
||||
->options(array('utf8' => true))
|
||||
->options(['utf8' => true])
|
||||
->add('buz', 'zub')
|
||||
->controller('foo:act');
|
||||
|
||||
$routes->import('php_dsl_sub.php')
|
||||
->prefix('/sub')
|
||||
->requirements(array('id' => '\d+'));
|
||||
->requirements(['id' => '\d+']);
|
||||
|
||||
$routes->import('php_dsl_sub.php')
|
||||
->namePrefix('z_')
|
||||
@@ -25,8 +25,8 @@ return new class() {
|
||||
->prefix('/bus', false);
|
||||
|
||||
$routes->add('ouf', '/ouf')
|
||||
->schemes(array('https'))
|
||||
->methods(array('GET'))
|
||||
->defaults(array('id' => 0));
|
||||
->schemes(['https'])
|
||||
->methods(['GET'])
|
||||
->defaults(['id' => 0]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing
|
||||
http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
|
||||
@@ -6,12 +6,12 @@ use Symfony\Component\Routing\RouteCollection;
|
||||
$collection = new RouteCollection();
|
||||
$collection->add('blog_show', new Route(
|
||||
'/blog/{slug}',
|
||||
array('_controller' => 'MyBlogBundle:Blog:show'),
|
||||
array('locale' => '\w+'),
|
||||
array('compiler_class' => 'RouteCompiler'),
|
||||
['_controller' => 'MyBlogBundle:Blog:show'],
|
||||
['locale' => '\w+'],
|
||||
['compiler_class' => 'RouteCompiler'],
|
||||
'{locale}.example.com',
|
||||
array('https'),
|
||||
array('GET', 'POST', 'put', 'OpTiOnS'),
|
||||
['https'],
|
||||
['GET', 'POST', 'put', 'OpTiOnS'],
|
||||
'context.getMethod() == "GET"'
|
||||
));
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}" host="{locale}.example.com" methods="GET|POST put,OpTiOnS" schemes="hTTps">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
/** @var $loader \Symfony\Component\Routing\Loader\PhpFileLoader */
|
||||
/** @var \Symfony\Component\Routing\RouteCollection $collection */
|
||||
$collection = $loader->import('validpattern.php');
|
||||
$collection->addDefaults(array(
|
||||
$collection->addDefaults([
|
||||
'foo' => 123,
|
||||
));
|
||||
$collection->addRequirements(array(
|
||||
]);
|
||||
$collection->addRequirements([
|
||||
'foo' => '\d+',
|
||||
));
|
||||
$collection->addOptions(array(
|
||||
]);
|
||||
$collection->addOptions([
|
||||
'foo' => 'bar',
|
||||
));
|
||||
]);
|
||||
$collection->setCondition('context.getMethod() == "POST"');
|
||||
$collection->addPrefix('/prefix');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<import resource="validpattern.xml" prefix="/{foo}" host="">
|
||||
<default key="foo">123</default>
|
||||
|
||||
Reference in New Issue
Block a user