Added Laravel project
This commit is contained in:
16
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php
vendored
Normal file
16
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses;
|
||||
|
||||
abstract class AbstractClass
|
||||
{
|
||||
}
|
19
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/BarClass.php
vendored
Normal file
19
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/BarClass.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses;
|
||||
|
||||
class BarClass
|
||||
{
|
||||
public function routeAction($arg1, $arg2 = 'defaultValue2', $arg3 = 'defaultValue3')
|
||||
{
|
||||
}
|
||||
}
|
19
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/BazClass.php
vendored
Normal file
19
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/BazClass.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses;
|
||||
|
||||
class BazClass
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
}
|
||||
}
|
16
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/FooClass.php
vendored
Normal file
16
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/FooClass.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses;
|
||||
|
||||
class FooClass
|
||||
{
|
||||
}
|
13
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php
vendored
Normal file
13
Laravel/vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses;
|
||||
|
||||
trait FooTrait
|
||||
{
|
||||
public function doBar()
|
||||
{
|
||||
$baz = self::class;
|
||||
if (true) {
|
||||
}
|
||||
}
|
||||
}
|
18
Laravel/vendor/symfony/routing/Tests/Fixtures/CustomCompiledRoute.php
vendored
Normal file
18
Laravel/vendor/symfony/routing/Tests/Fixtures/CustomCompiledRoute.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\Routing\CompiledRoute;
|
||||
|
||||
class CustomCompiledRoute extends CompiledRoute
|
||||
{
|
||||
}
|
26
Laravel/vendor/symfony/routing/Tests/Fixtures/CustomRouteCompiler.php
vendored
Normal file
26
Laravel/vendor/symfony/routing/Tests/Fixtures/CustomRouteCompiler.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\Routing\Route;
|
||||
use Symfony\Component\Routing\RouteCompiler;
|
||||
|
||||
class CustomRouteCompiler extends RouteCompiler
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function compile(Route $route)
|
||||
{
|
||||
return new CustomCompiledRoute('', '', array(), array());
|
||||
}
|
||||
}
|
26
Laravel/vendor/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php
vendored
Normal file
26
Laravel/vendor/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\Routing\Loader\XmlFileLoader;
|
||||
use Symfony\Component\Config\Util\XmlUtils;
|
||||
|
||||
/**
|
||||
* XmlFileLoader with schema validation turned off.
|
||||
*/
|
||||
class CustomXmlFileLoader extends XmlFileLoader
|
||||
{
|
||||
protected function loadFile($file)
|
||||
{
|
||||
return XmlUtils::loadFile($file, function () { return true; });
|
||||
}
|
||||
}
|
3
Laravel/vendor/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/NoStartTagClass.php
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/NoStartTagClass.php
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class NoStartTagClass
|
||||
{
|
||||
}
|
19
Laravel/vendor/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php
vendored
Normal file
19
Laravel/vendor/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures\OtherAnnotatedClasses;
|
||||
|
||||
class VariadicClass
|
||||
{
|
||||
public function routeAction(...$params)
|
||||
{
|
||||
}
|
||||
}
|
30
Laravel/vendor/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php
vendored
Normal file
30
Laravel/vendor/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Routing\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\Routing\Matcher\UrlMatcher;
|
||||
use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface
|
||||
{
|
||||
public function redirect($path, $route, $scheme = null)
|
||||
{
|
||||
return array(
|
||||
'_controller' => 'Some controller reference...',
|
||||
'path' => $path,
|
||||
'scheme' => $scheme,
|
||||
);
|
||||
}
|
||||
}
|
0
Laravel/vendor/symfony/routing/Tests/Fixtures/annotated.php
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/annotated.php
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/bad_format.yml
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/bad_format.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
blog_show:
|
||||
path: /blog/{slug}
|
||||
defaults: { _controller: "MyBundle:Blog:show" }
|
0
Laravel/vendor/symfony/routing/Tests/Fixtures/bar.xml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/bar.xml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/directory/recurse/routes1.yml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/directory/recurse/routes1.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
route1:
|
||||
path: /route/1
|
2
Laravel/vendor/symfony/routing/Tests/Fixtures/directory/recurse/routes2.yml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/directory/recurse/routes2.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
route2:
|
||||
path: /route/2
|
2
Laravel/vendor/symfony/routing/Tests/Fixtures/directory/routes3.yml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/directory/routes3.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
route3:
|
||||
path: /route/3
|
3
Laravel/vendor/symfony/routing/Tests/Fixtures/directory_import/import.yml
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/directory_import/import.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
_directory:
|
||||
resource: "../directory"
|
||||
type: directory
|
163
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.apache
vendored
Normal file
163
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.apache
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
# skip "real" requests
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule .* - [QSA,L]
|
||||
|
||||
# foo
|
||||
RewriteCond %{REQUEST_URI} ^/foo/(baz|symfony)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:foo,E=_ROUTING_param_bar:%1,E=_ROUTING_default_def:test]
|
||||
|
||||
# foobar
|
||||
RewriteCond %{REQUEST_URI} ^/foo(?:/([^/]++))?$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:foobar,E=_ROUTING_param_bar:%1,E=_ROUTING_default_bar:toto]
|
||||
|
||||
# bar
|
||||
RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$
|
||||
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC]
|
||||
RewriteRule .* - [S=1,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_HEAD:1]
|
||||
RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:bar,E=_ROUTING_param_foo:%1]
|
||||
|
||||
# baragain
|
||||
RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$
|
||||
RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$ [NC]
|
||||
RewriteRule .* - [S=1,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_POST:1,E=_ROUTING_allow_HEAD:1]
|
||||
RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baragain,E=_ROUTING_param_foo:%1]
|
||||
|
||||
# baz
|
||||
RewriteCond %{REQUEST_URI} ^/test/baz$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz]
|
||||
|
||||
# baz2
|
||||
RewriteCond %{REQUEST_URI} ^/test/baz\.html$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz2]
|
||||
|
||||
# baz3
|
||||
RewriteCond %{REQUEST_URI} ^/test/baz3$
|
||||
RewriteRule .* $0/ [QSA,L,R=301]
|
||||
RewriteCond %{REQUEST_URI} ^/test/baz3/$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz3]
|
||||
|
||||
# baz4
|
||||
RewriteCond %{REQUEST_URI} ^/test/([^/]++)$
|
||||
RewriteRule .* $0/ [QSA,L,R=301]
|
||||
RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz4,E=_ROUTING_param_foo:%1]
|
||||
|
||||
# baz5
|
||||
RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$
|
||||
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC]
|
||||
RewriteRule .* - [S=2,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_HEAD:1]
|
||||
RewriteCond %{REQUEST_URI} ^/test/([^/]++)$
|
||||
RewriteRule .* $0/ [QSA,L,R=301]
|
||||
RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz5,E=_ROUTING_param_foo:%1]
|
||||
|
||||
# baz5unsafe
|
||||
RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$
|
||||
RewriteCond %{REQUEST_METHOD} !^(POST)$ [NC]
|
||||
RewriteRule .* - [S=1,E=_ROUTING_allow_POST:1]
|
||||
RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz5unsafe,E=_ROUTING_param_foo:%1]
|
||||
|
||||
# baz6
|
||||
RewriteCond %{REQUEST_URI} ^/test/baz$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz6,E=_ROUTING_default_foo:bar\ baz]
|
||||
|
||||
# baz7
|
||||
RewriteCond %{REQUEST_URI} ^/te\ st/baz$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz7]
|
||||
|
||||
# baz8
|
||||
RewriteCond %{REQUEST_URI} ^/te\\\ st/baz$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz8]
|
||||
|
||||
# baz9
|
||||
RewriteCond %{REQUEST_URI} ^/test/(te\\\ st)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz9,E=_ROUTING_param_baz:%1]
|
||||
|
||||
RewriteCond %{HTTP:Host} ^a\.example\.com$
|
||||
RewriteRule .? - [E=__ROUTING_host_1:1]
|
||||
|
||||
# route1
|
||||
RewriteCond %{ENV:__ROUTING_host_1} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route1$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route1]
|
||||
|
||||
# route2
|
||||
RewriteCond %{ENV:__ROUTING_host_1} =1
|
||||
RewriteCond %{REQUEST_URI} ^/c2/route2$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route2]
|
||||
|
||||
RewriteCond %{HTTP:Host} ^b\.example\.com$
|
||||
RewriteRule .? - [E=__ROUTING_host_2:1]
|
||||
|
||||
# route3
|
||||
RewriteCond %{ENV:__ROUTING_host_2} =1
|
||||
RewriteCond %{REQUEST_URI} ^/c2/route3$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route3]
|
||||
|
||||
RewriteCond %{HTTP:Host} ^a\.example\.com$
|
||||
RewriteRule .? - [E=__ROUTING_host_3:1]
|
||||
|
||||
# route4
|
||||
RewriteCond %{ENV:__ROUTING_host_3} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route4$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route4]
|
||||
|
||||
RewriteCond %{HTTP:Host} ^c\.example\.com$
|
||||
RewriteRule .? - [E=__ROUTING_host_4:1]
|
||||
|
||||
# route5
|
||||
RewriteCond %{ENV:__ROUTING_host_4} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route5$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route5]
|
||||
|
||||
# route6
|
||||
RewriteCond %{REQUEST_URI} ^/route6$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route6]
|
||||
|
||||
RewriteCond %{HTTP:Host} ^([^\.]++)\.example\.com$
|
||||
RewriteRule .? - [E=__ROUTING_host_5:1,E=__ROUTING_host_5_var1:%1]
|
||||
|
||||
# route11
|
||||
RewriteCond %{ENV:__ROUTING_host_5} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route11$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route11,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1}]
|
||||
|
||||
# route12
|
||||
RewriteCond %{ENV:__ROUTING_host_5} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route12$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route12,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_default_var1:val]
|
||||
|
||||
# route13
|
||||
RewriteCond %{ENV:__ROUTING_host_5} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route13/([^/]++)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route13,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_param_name:%1]
|
||||
|
||||
# route14
|
||||
RewriteCond %{ENV:__ROUTING_host_5} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route14/([^/]++)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route14,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_param_name:%1,E=_ROUTING_default_var1:val]
|
||||
|
||||
RewriteCond %{HTTP:Host} ^c\.example\.com$
|
||||
RewriteRule .? - [E=__ROUTING_host_6:1]
|
||||
|
||||
# route15
|
||||
RewriteCond %{ENV:__ROUTING_host_6} =1
|
||||
RewriteCond %{REQUEST_URI} ^/route15/([^/]++)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route15,E=_ROUTING_param_name:%1]
|
||||
|
||||
# route16
|
||||
RewriteCond %{REQUEST_URI} ^/route16/([^/]++)$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route16,E=_ROUTING_param_name:%1,E=_ROUTING_default_var1:val]
|
||||
|
||||
# route17
|
||||
RewriteCond %{REQUEST_URI} ^/route17$
|
||||
RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route17]
|
||||
|
||||
# 405 Method Not Allowed
|
||||
RewriteCond %{ENV:_ROUTING__allow_GET} =1 [OR]
|
||||
RewriteCond %{ENV:_ROUTING__allow_HEAD} =1 [OR]
|
||||
RewriteCond %{ENV:_ROUTING__allow_POST} =1
|
||||
RewriteRule .* app.php [QSA,L]
|
317
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php
vendored
Normal file
317
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
if (0 === strpos($pathinfo, '/foo')) {
|
||||
// foo
|
||||
if (preg_match('#^/foo/(?P<bar>baz|symfony)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo')), array ( 'def' => 'test',));
|
||||
}
|
||||
|
||||
// foofoo
|
||||
if ('/foofoo' === $pathinfo) {
|
||||
return array ( 'def' => 'test', '_route' => 'foofoo',);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/bar')) {
|
||||
// bar
|
||||
if (preg_match('#^/bar/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_bar;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar')), array ());
|
||||
}
|
||||
not_bar:
|
||||
|
||||
// barhead
|
||||
if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_barhead;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'barhead')), array ());
|
||||
}
|
||||
not_barhead:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/test')) {
|
||||
if (0 === strpos($pathinfo, '/test/baz')) {
|
||||
// baz
|
||||
if ('/test/baz' === $pathinfo) {
|
||||
return array('_route' => 'baz');
|
||||
}
|
||||
|
||||
// baz2
|
||||
if ('/test/baz.html' === $pathinfo) {
|
||||
return array('_route' => 'baz2');
|
||||
}
|
||||
|
||||
// baz3
|
||||
if ('/test/baz3/' === $pathinfo) {
|
||||
return array('_route' => 'baz3');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// baz4
|
||||
if (preg_match('#^/test/(?P<foo>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ());
|
||||
}
|
||||
|
||||
// baz5
|
||||
if (preg_match('#^/test/(?P<foo>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_baz5;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz5')), array ());
|
||||
}
|
||||
not_baz5:
|
||||
|
||||
// baz.baz6
|
||||
if (preg_match('#^/test/(?P<foo>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('PUT' !== $canonicalMethod) {
|
||||
$allow[] = 'PUT';
|
||||
goto not_bazbaz6;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz.baz6')), array ());
|
||||
}
|
||||
not_bazbaz6:
|
||||
|
||||
}
|
||||
|
||||
// quoter
|
||||
if (preg_match('#^/(?P<quoter>[\']+)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'quoter')), array ());
|
||||
}
|
||||
|
||||
// space
|
||||
if ('/spa ce' === $pathinfo) {
|
||||
return array('_route' => 'space');
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a')) {
|
||||
if (0 === strpos($pathinfo, '/a/b\'b')) {
|
||||
// foo1
|
||||
if (preg_match('#^/a/b\'b/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo1')), array ());
|
||||
}
|
||||
|
||||
// bar1
|
||||
if (preg_match('#^/a/b\'b/(?P<bar>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar1')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// overridden
|
||||
if (preg_match('#^/a/(?P<var>.*)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'overridden')), array ());
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a/b\'b')) {
|
||||
// foo2
|
||||
if (preg_match('#^/a/b\'b/(?P<foo1>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo2')), array ());
|
||||
}
|
||||
|
||||
// bar2
|
||||
if (preg_match('#^/a/b\'b/(?P<bar1>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar2')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/multi')) {
|
||||
// helloWorld
|
||||
if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?P<who>[^/]++))?$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'helloWorld')), array ( 'who' => 'World!',));
|
||||
}
|
||||
|
||||
// hey
|
||||
if ('/multi/hey/' === $pathinfo) {
|
||||
return array('_route' => 'hey');
|
||||
}
|
||||
|
||||
// overridden2
|
||||
if ('/multi/new' === $pathinfo) {
|
||||
return array('_route' => 'overridden2');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// foo3
|
||||
if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo3')), array ());
|
||||
}
|
||||
|
||||
// bar3
|
||||
if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P<bar>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar3')), array ());
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/aba')) {
|
||||
// ababa
|
||||
if ('/ababa' === $pathinfo) {
|
||||
return array('_route' => 'ababa');
|
||||
}
|
||||
|
||||
// foo4
|
||||
if (preg_match('#^/aba/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo4')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$host = $context->getHost();
|
||||
|
||||
if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route1
|
||||
if ('/route1' === $pathinfo) {
|
||||
return array('_route' => 'route1');
|
||||
}
|
||||
|
||||
// route2
|
||||
if ('/c2/route2' === $pathinfo) {
|
||||
return array('_route' => 'route2');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^b\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route3
|
||||
if ('/c2/route3' === $pathinfo) {
|
||||
return array('_route' => 'route3');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route4
|
||||
if ('/route4' === $pathinfo) {
|
||||
return array('_route' => 'route4');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route5
|
||||
if ('/route5' === $pathinfo) {
|
||||
return array('_route' => 'route5');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// route6
|
||||
if ('/route6' === $pathinfo) {
|
||||
return array('_route' => 'route6');
|
||||
}
|
||||
|
||||
if (preg_match('#^(?P<var1>[^\\.]++)\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
if (0 === strpos($pathinfo, '/route1')) {
|
||||
// route11
|
||||
if ('/route11' === $pathinfo) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route11')), array ());
|
||||
}
|
||||
|
||||
// route12
|
||||
if ('/route12' === $pathinfo) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route12')), array ( 'var1' => 'val',));
|
||||
}
|
||||
|
||||
// route13
|
||||
if (0 === strpos($pathinfo, '/route13') && preg_match('#^/route13/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route13')), array ());
|
||||
}
|
||||
|
||||
// route14
|
||||
if (0 === strpos($pathinfo, '/route14') && preg_match('#^/route14/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route14')), array ( 'var1' => 'val',));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route15
|
||||
if (0 === strpos($pathinfo, '/route15') && preg_match('#^/route15/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'route15')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// route16
|
||||
if (0 === strpos($pathinfo, '/route16') && preg_match('#^/route16/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'route16')), array ( 'var1' => 'val',));
|
||||
}
|
||||
|
||||
// route17
|
||||
if ('/route17' === $pathinfo) {
|
||||
return array('_route' => 'route17');
|
||||
}
|
||||
|
||||
// a
|
||||
if ('/a/a...' === $pathinfo) {
|
||||
return array('_route' => 'a');
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a/b')) {
|
||||
// b
|
||||
if (preg_match('#^/a/b/(?P<var>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'b')), array ());
|
||||
}
|
||||
|
||||
// c
|
||||
if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?P<var>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'c')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
7
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.apache
vendored
Normal file
7
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.apache
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# skip "real" requests
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule .* - [QSA,L]
|
||||
|
||||
# foo
|
||||
RewriteCond %{REQUEST_URI} ^/foo$
|
||||
RewriteRule .* ap\ p_d\ ev.php [QSA,L,E=_ROUTING_route:foo]
|
349
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php
vendored
Normal file
349
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php
vendored
Normal file
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
if (0 === strpos($pathinfo, '/foo')) {
|
||||
// foo
|
||||
if (preg_match('#^/foo/(?P<bar>baz|symfony)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo')), array ( 'def' => 'test',));
|
||||
}
|
||||
|
||||
// foofoo
|
||||
if ('/foofoo' === $pathinfo) {
|
||||
return array ( 'def' => 'test', '_route' => 'foofoo',);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/bar')) {
|
||||
// bar
|
||||
if (preg_match('#^/bar/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_bar;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar')), array ());
|
||||
}
|
||||
not_bar:
|
||||
|
||||
// barhead
|
||||
if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_barhead;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'barhead')), array ());
|
||||
}
|
||||
not_barhead:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/test')) {
|
||||
if (0 === strpos($pathinfo, '/test/baz')) {
|
||||
// baz
|
||||
if ('/test/baz' === $pathinfo) {
|
||||
return array('_route' => 'baz');
|
||||
}
|
||||
|
||||
// baz2
|
||||
if ('/test/baz.html' === $pathinfo) {
|
||||
return array('_route' => 'baz2');
|
||||
}
|
||||
|
||||
// baz3
|
||||
if ('/test/baz3' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'baz3');
|
||||
}
|
||||
|
||||
return array('_route' => 'baz3');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// baz4
|
||||
if (preg_match('#^/test/(?P<foo>[^/]++)/?$#s', $pathinfo, $matches)) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'baz4');
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ());
|
||||
}
|
||||
|
||||
// baz5
|
||||
if (preg_match('#^/test/(?P<foo>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_baz5;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz5')), array ());
|
||||
}
|
||||
not_baz5:
|
||||
|
||||
// baz.baz6
|
||||
if (preg_match('#^/test/(?P<foo>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('PUT' !== $canonicalMethod) {
|
||||
$allow[] = 'PUT';
|
||||
goto not_bazbaz6;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz.baz6')), array ());
|
||||
}
|
||||
not_bazbaz6:
|
||||
|
||||
}
|
||||
|
||||
// quoter
|
||||
if (preg_match('#^/(?P<quoter>[\']+)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'quoter')), array ());
|
||||
}
|
||||
|
||||
// space
|
||||
if ('/spa ce' === $pathinfo) {
|
||||
return array('_route' => 'space');
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a')) {
|
||||
if (0 === strpos($pathinfo, '/a/b\'b')) {
|
||||
// foo1
|
||||
if (preg_match('#^/a/b\'b/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo1')), array ());
|
||||
}
|
||||
|
||||
// bar1
|
||||
if (preg_match('#^/a/b\'b/(?P<bar>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar1')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// overridden
|
||||
if (preg_match('#^/a/(?P<var>.*)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'overridden')), array ());
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a/b\'b')) {
|
||||
// foo2
|
||||
if (preg_match('#^/a/b\'b/(?P<foo1>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo2')), array ());
|
||||
}
|
||||
|
||||
// bar2
|
||||
if (preg_match('#^/a/b\'b/(?P<bar1>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar2')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/multi')) {
|
||||
// helloWorld
|
||||
if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?P<who>[^/]++))?$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'helloWorld')), array ( 'who' => 'World!',));
|
||||
}
|
||||
|
||||
// hey
|
||||
if ('/multi/hey' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'hey');
|
||||
}
|
||||
|
||||
return array('_route' => 'hey');
|
||||
}
|
||||
|
||||
// overridden2
|
||||
if ('/multi/new' === $pathinfo) {
|
||||
return array('_route' => 'overridden2');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// foo3
|
||||
if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo3')), array ());
|
||||
}
|
||||
|
||||
// bar3
|
||||
if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P<bar>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar3')), array ());
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/aba')) {
|
||||
// ababa
|
||||
if ('/ababa' === $pathinfo) {
|
||||
return array('_route' => 'ababa');
|
||||
}
|
||||
|
||||
// foo4
|
||||
if (preg_match('#^/aba/(?P<foo>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo4')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$host = $context->getHost();
|
||||
|
||||
if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route1
|
||||
if ('/route1' === $pathinfo) {
|
||||
return array('_route' => 'route1');
|
||||
}
|
||||
|
||||
// route2
|
||||
if ('/c2/route2' === $pathinfo) {
|
||||
return array('_route' => 'route2');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^b\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route3
|
||||
if ('/c2/route3' === $pathinfo) {
|
||||
return array('_route' => 'route3');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route4
|
||||
if ('/route4' === $pathinfo) {
|
||||
return array('_route' => 'route4');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route5
|
||||
if ('/route5' === $pathinfo) {
|
||||
return array('_route' => 'route5');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// route6
|
||||
if ('/route6' === $pathinfo) {
|
||||
return array('_route' => 'route6');
|
||||
}
|
||||
|
||||
if (preg_match('#^(?P<var1>[^\\.]++)\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
if (0 === strpos($pathinfo, '/route1')) {
|
||||
// route11
|
||||
if ('/route11' === $pathinfo) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route11')), array ());
|
||||
}
|
||||
|
||||
// route12
|
||||
if ('/route12' === $pathinfo) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route12')), array ( 'var1' => 'val',));
|
||||
}
|
||||
|
||||
// route13
|
||||
if (0 === strpos($pathinfo, '/route13') && preg_match('#^/route13/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route13')), array ());
|
||||
}
|
||||
|
||||
// route14
|
||||
if (0 === strpos($pathinfo, '/route14') && preg_match('#^/route14/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route14')), array ( 'var1' => 'val',));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) {
|
||||
// route15
|
||||
if (0 === strpos($pathinfo, '/route15') && preg_match('#^/route15/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'route15')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// route16
|
||||
if (0 === strpos($pathinfo, '/route16') && preg_match('#^/route16/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'route16')), array ( 'var1' => 'val',));
|
||||
}
|
||||
|
||||
// route17
|
||||
if ('/route17' === $pathinfo) {
|
||||
return array('_route' => 'route17');
|
||||
}
|
||||
|
||||
// a
|
||||
if ('/a/a...' === $pathinfo) {
|
||||
return array('_route' => 'a');
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a/b')) {
|
||||
// b
|
||||
if (preg_match('#^/a/b/(?P<var>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'b')), array ());
|
||||
}
|
||||
|
||||
// c
|
||||
if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?P<var>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'c')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// secure
|
||||
if ('/secure' === $pathinfo) {
|
||||
$requiredSchemes = array ( 'https' => 0,);
|
||||
if (!isset($requiredSchemes[$scheme])) {
|
||||
return $this->redirect($pathinfo, 'secure', key($requiredSchemes));
|
||||
}
|
||||
|
||||
return array('_route' => 'secure');
|
||||
}
|
||||
|
||||
// nonsecure
|
||||
if ('/nonsecure' === $pathinfo) {
|
||||
$requiredSchemes = array ( 'http' => 0,);
|
||||
if (!isset($requiredSchemes[$scheme])) {
|
||||
return $this->redirect($pathinfo, 'nonsecure', key($requiredSchemes));
|
||||
}
|
||||
|
||||
return array('_route' => 'nonsecure');
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
58
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php
vendored
Normal file
58
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
if (0 === strpos($pathinfo, '/rootprefix')) {
|
||||
// static
|
||||
if ('/rootprefix/test' === $pathinfo) {
|
||||
return array('_route' => 'static');
|
||||
}
|
||||
|
||||
// dynamic
|
||||
if (preg_match('#^/rootprefix/(?P<var>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'dynamic')), array ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// with-condition
|
||||
if ('/with-condition' === $pathinfo && ($context->getMethod() == "GET")) {
|
||||
return array('_route' => 'with-condition');
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
109
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php
vendored
Normal file
109
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
// just_head
|
||||
if ('/just_head' === $pathinfo) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_just_head;
|
||||
}
|
||||
|
||||
return array('_route' => 'just_head');
|
||||
}
|
||||
not_just_head:
|
||||
|
||||
// head_and_get
|
||||
if ('/head_and_get' === $pathinfo) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_head_and_get;
|
||||
}
|
||||
|
||||
return array('_route' => 'head_and_get');
|
||||
}
|
||||
not_head_and_get:
|
||||
|
||||
// get_and_head
|
||||
if ('/get_and_head' === $pathinfo) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_get_and_head;
|
||||
}
|
||||
|
||||
return array('_route' => 'get_and_head');
|
||||
}
|
||||
not_get_and_head:
|
||||
|
||||
// post_and_head
|
||||
if ('/post_and_get' === $pathinfo) {
|
||||
if (!in_array($requestMethod, array('POST', 'HEAD'))) {
|
||||
$allow = array_merge($allow, array('POST', 'HEAD'));
|
||||
goto not_post_and_head;
|
||||
}
|
||||
|
||||
return array('_route' => 'post_and_head');
|
||||
}
|
||||
not_post_and_head:
|
||||
|
||||
if (0 === strpos($pathinfo, '/put_and_post')) {
|
||||
// put_and_post
|
||||
if ('/put_and_post' === $pathinfo) {
|
||||
if (!in_array($requestMethod, array('PUT', 'POST'))) {
|
||||
$allow = array_merge($allow, array('PUT', 'POST'));
|
||||
goto not_put_and_post;
|
||||
}
|
||||
|
||||
return array('_route' => 'put_and_post');
|
||||
}
|
||||
not_put_and_post:
|
||||
|
||||
// put_and_get_and_head
|
||||
if ('/put_and_post' === $pathinfo) {
|
||||
if (!in_array($canonicalMethod, array('PUT', 'GET'))) {
|
||||
$allow = array_merge($allow, array('PUT', 'GET'));
|
||||
goto not_put_and_get_and_head;
|
||||
}
|
||||
|
||||
return array('_route' => 'put_and_get_and_head');
|
||||
}
|
||||
not_put_and_get_and_head:
|
||||
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
158
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php
vendored
Normal file
158
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
if (0 === strpos($pathinfo, '/a')) {
|
||||
// a_first
|
||||
if ('/a/11' === $pathinfo) {
|
||||
return array('_route' => 'a_first');
|
||||
}
|
||||
|
||||
// a_second
|
||||
if ('/a/22' === $pathinfo) {
|
||||
return array('_route' => 'a_second');
|
||||
}
|
||||
|
||||
// a_third
|
||||
if ('/a/333' === $pathinfo) {
|
||||
return array('_route' => 'a_third');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// a_wildcard
|
||||
if (preg_match('#^/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'a_wildcard')), array ());
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/a')) {
|
||||
// a_fourth
|
||||
if ('/a/44' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'a_fourth');
|
||||
}
|
||||
|
||||
return array('_route' => 'a_fourth');
|
||||
}
|
||||
|
||||
// a_fifth
|
||||
if ('/a/55' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'a_fifth');
|
||||
}
|
||||
|
||||
return array('_route' => 'a_fifth');
|
||||
}
|
||||
|
||||
// a_sixth
|
||||
if ('/a/66' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'a_sixth');
|
||||
}
|
||||
|
||||
return array('_route' => 'a_sixth');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// nested_wildcard
|
||||
if (0 === strpos($pathinfo, '/nested') && preg_match('#^/nested/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'nested_wildcard')), array ());
|
||||
}
|
||||
|
||||
if (0 === strpos($pathinfo, '/nested/group')) {
|
||||
// nested_a
|
||||
if ('/nested/group/a' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'nested_a');
|
||||
}
|
||||
|
||||
return array('_route' => 'nested_a');
|
||||
}
|
||||
|
||||
// nested_b
|
||||
if ('/nested/group/b' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'nested_b');
|
||||
}
|
||||
|
||||
return array('_route' => 'nested_b');
|
||||
}
|
||||
|
||||
// nested_c
|
||||
if ('/nested/group/c' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'nested_c');
|
||||
}
|
||||
|
||||
return array('_route' => 'nested_c');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/slashed/group')) {
|
||||
// slashed_a
|
||||
if ('/slashed/group' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'slashed_a');
|
||||
}
|
||||
|
||||
return array('_route' => 'slashed_a');
|
||||
}
|
||||
|
||||
// slashed_b
|
||||
if ('/slashed/group/b' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'slashed_b');
|
||||
}
|
||||
|
||||
return array('_route' => 'slashed_b');
|
||||
}
|
||||
|
||||
// slashed_c
|
||||
if ('/slashed/group/c' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'slashed_c');
|
||||
}
|
||||
|
||||
return array('_route' => 'slashed_c');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
204
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php
vendored
Normal file
204
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
if (0 === strpos($pathinfo, '/trailing/simple')) {
|
||||
// simple_trailing_slash_no_methods
|
||||
if ('/trailing/simple/no-methods/' === $pathinfo) {
|
||||
return array('_route' => 'simple_trailing_slash_no_methods');
|
||||
}
|
||||
|
||||
// simple_trailing_slash_GET_method
|
||||
if ('/trailing/simple/get-method/' === $pathinfo) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_simple_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_GET_method');
|
||||
}
|
||||
not_simple_trailing_slash_GET_method:
|
||||
|
||||
// simple_trailing_slash_HEAD_method
|
||||
if ('/trailing/simple/head-method/' === $pathinfo) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_simple_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_HEAD_method');
|
||||
}
|
||||
not_simple_trailing_slash_HEAD_method:
|
||||
|
||||
// simple_trailing_slash_POST_method
|
||||
if ('/trailing/simple/post-method/' === $pathinfo) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_simple_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_POST_method');
|
||||
}
|
||||
not_simple_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/trailing/regex')) {
|
||||
// regex_trailing_slash_no_methods
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/no-methods') && preg_match('#^/trailing/regex/no\\-methods/(?P<param>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_no_methods')), array ());
|
||||
}
|
||||
|
||||
// regex_trailing_slash_GET_method
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/get-method') && preg_match('#^/trailing/regex/get\\-method/(?P<param>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_regex_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_GET_method')), array ());
|
||||
}
|
||||
not_regex_trailing_slash_GET_method:
|
||||
|
||||
// regex_trailing_slash_HEAD_method
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/head-method') && preg_match('#^/trailing/regex/head\\-method/(?P<param>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_regex_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_HEAD_method')), array ());
|
||||
}
|
||||
not_regex_trailing_slash_HEAD_method:
|
||||
|
||||
// regex_trailing_slash_POST_method
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/post-method') && preg_match('#^/trailing/regex/post\\-method/(?P<param>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_regex_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_POST_method')), array ());
|
||||
}
|
||||
not_regex_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/not-trailing/simple')) {
|
||||
// simple_not_trailing_slash_no_methods
|
||||
if ('/not-trailing/simple/no-methods' === $pathinfo) {
|
||||
return array('_route' => 'simple_not_trailing_slash_no_methods');
|
||||
}
|
||||
|
||||
// simple_not_trailing_slash_GET_method
|
||||
if ('/not-trailing/simple/get-method' === $pathinfo) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_simple_not_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_not_trailing_slash_GET_method');
|
||||
}
|
||||
not_simple_not_trailing_slash_GET_method:
|
||||
|
||||
// simple_not_trailing_slash_HEAD_method
|
||||
if ('/not-trailing/simple/head-method' === $pathinfo) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_simple_not_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_not_trailing_slash_HEAD_method');
|
||||
}
|
||||
not_simple_not_trailing_slash_HEAD_method:
|
||||
|
||||
// simple_not_trailing_slash_POST_method
|
||||
if ('/not-trailing/simple/post-method' === $pathinfo) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_simple_not_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_not_trailing_slash_POST_method');
|
||||
}
|
||||
not_simple_not_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/not-trailing/regex')) {
|
||||
// regex_not_trailing_slash_no_methods
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/no-methods') && preg_match('#^/not\\-trailing/regex/no\\-methods/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_no_methods')), array ());
|
||||
}
|
||||
|
||||
// regex_not_trailing_slash_GET_method
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/get-method') && preg_match('#^/not\\-trailing/regex/get\\-method/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_regex_not_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_GET_method')), array ());
|
||||
}
|
||||
not_regex_not_trailing_slash_GET_method:
|
||||
|
||||
// regex_not_trailing_slash_HEAD_method
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/head-method') && preg_match('#^/not\\-trailing/regex/head\\-method/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_regex_not_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_HEAD_method')), array ());
|
||||
}
|
||||
not_regex_not_trailing_slash_HEAD_method:
|
||||
|
||||
// regex_not_trailing_slash_POST_method
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/post-method') && preg_match('#^/not\\-trailing/regex/post\\-method/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_regex_not_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_POST_method')), array ());
|
||||
}
|
||||
not_regex_not_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
228
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php
vendored
Normal file
228
Laravel/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* ProjectUrlMatcher.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Routing Component.
|
||||
*/
|
||||
class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct(RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function match($pathinfo)
|
||||
{
|
||||
$allow = array();
|
||||
$pathinfo = rawurldecode($pathinfo);
|
||||
$trimmedPathinfo = rtrim($pathinfo, '/');
|
||||
$context = $this->context;
|
||||
$request = $this->request;
|
||||
$requestMethod = $canonicalMethod = $context->getMethod();
|
||||
$scheme = $context->getScheme();
|
||||
|
||||
if ('HEAD' === $requestMethod) {
|
||||
$canonicalMethod = 'GET';
|
||||
}
|
||||
|
||||
|
||||
if (0 === strpos($pathinfo, '/trailing/simple')) {
|
||||
// simple_trailing_slash_no_methods
|
||||
if ('/trailing/simple/no-methods' === $trimmedPathinfo) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'simple_trailing_slash_no_methods');
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_no_methods');
|
||||
}
|
||||
|
||||
// simple_trailing_slash_GET_method
|
||||
if ('/trailing/simple/get-method' === $trimmedPathinfo) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_simple_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'simple_trailing_slash_GET_method');
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_GET_method');
|
||||
}
|
||||
not_simple_trailing_slash_GET_method:
|
||||
|
||||
// simple_trailing_slash_HEAD_method
|
||||
if ('/trailing/simple/head-method' === $trimmedPathinfo) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_simple_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'simple_trailing_slash_HEAD_method');
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_HEAD_method');
|
||||
}
|
||||
not_simple_trailing_slash_HEAD_method:
|
||||
|
||||
// simple_trailing_slash_POST_method
|
||||
if ('/trailing/simple/post-method/' === $pathinfo) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_simple_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_trailing_slash_POST_method');
|
||||
}
|
||||
not_simple_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/trailing/regex')) {
|
||||
// regex_trailing_slash_no_methods
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/no-methods') && preg_match('#^/trailing/regex/no\\-methods/(?P<param>[^/]++)/?$#s', $pathinfo, $matches)) {
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'regex_trailing_slash_no_methods');
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_no_methods')), array ());
|
||||
}
|
||||
|
||||
// regex_trailing_slash_GET_method
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/get-method') && preg_match('#^/trailing/regex/get\\-method/(?P<param>[^/]++)/?$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_regex_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'regex_trailing_slash_GET_method');
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_GET_method')), array ());
|
||||
}
|
||||
not_regex_trailing_slash_GET_method:
|
||||
|
||||
// regex_trailing_slash_HEAD_method
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/head-method') && preg_match('#^/trailing/regex/head\\-method/(?P<param>[^/]++)/?$#s', $pathinfo, $matches)) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_regex_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
if (substr($pathinfo, -1) !== '/') {
|
||||
return $this->redirect($pathinfo.'/', 'regex_trailing_slash_HEAD_method');
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_HEAD_method')), array ());
|
||||
}
|
||||
not_regex_trailing_slash_HEAD_method:
|
||||
|
||||
// regex_trailing_slash_POST_method
|
||||
if (0 === strpos($pathinfo, '/trailing/regex/post-method') && preg_match('#^/trailing/regex/post\\-method/(?P<param>[^/]++)/$#s', $pathinfo, $matches)) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_regex_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_POST_method')), array ());
|
||||
}
|
||||
not_regex_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/not-trailing/simple')) {
|
||||
// simple_not_trailing_slash_no_methods
|
||||
if ('/not-trailing/simple/no-methods' === $pathinfo) {
|
||||
return array('_route' => 'simple_not_trailing_slash_no_methods');
|
||||
}
|
||||
|
||||
// simple_not_trailing_slash_GET_method
|
||||
if ('/not-trailing/simple/get-method' === $pathinfo) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_simple_not_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_not_trailing_slash_GET_method');
|
||||
}
|
||||
not_simple_not_trailing_slash_GET_method:
|
||||
|
||||
// simple_not_trailing_slash_HEAD_method
|
||||
if ('/not-trailing/simple/head-method' === $pathinfo) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_simple_not_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_not_trailing_slash_HEAD_method');
|
||||
}
|
||||
not_simple_not_trailing_slash_HEAD_method:
|
||||
|
||||
// simple_not_trailing_slash_POST_method
|
||||
if ('/not-trailing/simple/post-method' === $pathinfo) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_simple_not_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return array('_route' => 'simple_not_trailing_slash_POST_method');
|
||||
}
|
||||
not_simple_not_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
elseif (0 === strpos($pathinfo, '/not-trailing/regex')) {
|
||||
// regex_not_trailing_slash_no_methods
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/no-methods') && preg_match('#^/not\\-trailing/regex/no\\-methods/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_no_methods')), array ());
|
||||
}
|
||||
|
||||
// regex_not_trailing_slash_GET_method
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/get-method') && preg_match('#^/not\\-trailing/regex/get\\-method/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('GET' !== $canonicalMethod) {
|
||||
$allow[] = 'GET';
|
||||
goto not_regex_not_trailing_slash_GET_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_GET_method')), array ());
|
||||
}
|
||||
not_regex_not_trailing_slash_GET_method:
|
||||
|
||||
// regex_not_trailing_slash_HEAD_method
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/head-method') && preg_match('#^/not\\-trailing/regex/head\\-method/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('HEAD' !== $requestMethod) {
|
||||
$allow[] = 'HEAD';
|
||||
goto not_regex_not_trailing_slash_HEAD_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_HEAD_method')), array ());
|
||||
}
|
||||
not_regex_not_trailing_slash_HEAD_method:
|
||||
|
||||
// regex_not_trailing_slash_POST_method
|
||||
if (0 === strpos($pathinfo, '/not-trailing/regex/post-method') && preg_match('#^/not\\-trailing/regex/post\\-method/(?P<param>[^/]++)$#s', $pathinfo, $matches)) {
|
||||
if ('POST' !== $canonicalMethod) {
|
||||
$allow[] = 'POST';
|
||||
goto not_regex_not_trailing_slash_POST_method;
|
||||
}
|
||||
|
||||
return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_POST_method')), array ());
|
||||
}
|
||||
not_regex_not_trailing_slash_POST_method:
|
||||
|
||||
}
|
||||
|
||||
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
||||
}
|
||||
}
|
0
Laravel/vendor/symfony/routing/Tests/Fixtures/empty.yml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/empty.yml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/file_resource.yml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/file_resource.yml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/foo.xml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/foo.xml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/foo1.xml
vendored
Normal file
0
Laravel/vendor/symfony/routing/Tests/Fixtures/foo1.xml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/incomplete.yml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/incomplete.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
blog_show:
|
||||
defaults: { _controller: MyBlogBundle:Blog:show }
|
20
Laravel/vendor/symfony/routing/Tests/Fixtures/list_defaults.xml
vendored
Normal file
20
Laravel/vendor/symfony/routing/Tests/Fixtures/list_defaults.xml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="values">
|
||||
<list>
|
||||
<bool>true</bool>
|
||||
<int>1</int>
|
||||
<float>3.5</float>
|
||||
<string>foo</string>
|
||||
</list>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
22
Laravel/vendor/symfony/routing/Tests/Fixtures/list_in_list_defaults.xml
vendored
Normal file
22
Laravel/vendor/symfony/routing/Tests/Fixtures/list_in_list_defaults.xml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="values">
|
||||
<list>
|
||||
<list>
|
||||
<bool>true</bool>
|
||||
<int>1</int>
|
||||
<float>3.5</float>
|
||||
<string>foo</string>
|
||||
</list>
|
||||
</list>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
22
Laravel/vendor/symfony/routing/Tests/Fixtures/list_in_map_defaults.xml
vendored
Normal file
22
Laravel/vendor/symfony/routing/Tests/Fixtures/list_in_map_defaults.xml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="values">
|
||||
<map>
|
||||
<list key="list">
|
||||
<bool>true</bool>
|
||||
<int>1</int>
|
||||
<float>3.5</float>
|
||||
<string>foo</string>
|
||||
</list>
|
||||
</map>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
22
Laravel/vendor/symfony/routing/Tests/Fixtures/list_null_values.xml
vendored
Normal file
22
Laravel/vendor/symfony/routing/Tests/Fixtures/list_null_values.xml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="list">
|
||||
<list>
|
||||
<bool xsi:nil="true" />
|
||||
<int xsi:nil="true" />
|
||||
<float xsi:nil="1" />
|
||||
<string xsi:nil="true" />
|
||||
<list xsi:nil="true" />
|
||||
<map xsi:nil="true" />
|
||||
</list>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
20
Laravel/vendor/symfony/routing/Tests/Fixtures/map_defaults.xml
vendored
Normal file
20
Laravel/vendor/symfony/routing/Tests/Fixtures/map_defaults.xml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="values">
|
||||
<map>
|
||||
<bool key="public">true</bool>
|
||||
<int key="page">1</int>
|
||||
<float key="price">3.5</float>
|
||||
<string key="title">foo</string>
|
||||
</map>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
22
Laravel/vendor/symfony/routing/Tests/Fixtures/map_in_list_defaults.xml
vendored
Normal file
22
Laravel/vendor/symfony/routing/Tests/Fixtures/map_in_list_defaults.xml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="values">
|
||||
<list>
|
||||
<map>
|
||||
<bool key="public">true</bool>
|
||||
<int key="page">1</int>
|
||||
<float key="price">3.5</float>
|
||||
<string key="title">foo</string>
|
||||
</map>
|
||||
</list>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
22
Laravel/vendor/symfony/routing/Tests/Fixtures/map_in_map_defaults.xml
vendored
Normal file
22
Laravel/vendor/symfony/routing/Tests/Fixtures/map_in_map_defaults.xml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="values">
|
||||
<map>
|
||||
<map key="map">
|
||||
<bool key="public">true</bool>
|
||||
<int key="page">1</int>
|
||||
<float key="price">3.5</float>
|
||||
<string key="title">foo</string>
|
||||
</map>
|
||||
</map>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
22
Laravel/vendor/symfony/routing/Tests/Fixtures/map_null_values.xml
vendored
Normal file
22
Laravel/vendor/symfony/routing/Tests/Fixtures/map_null_values.xml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="map">
|
||||
<map>
|
||||
<bool key="boolean" xsi:nil="true" />
|
||||
<int key="integer" xsi:nil="true" />
|
||||
<float key="float" xsi:nil="true" />
|
||||
<string key="string" xsi:nil="1" />
|
||||
<list key="list" xsi:nil="true" />
|
||||
<map key="map" xsi:nil="true" />
|
||||
</map>
|
||||
</default>
|
||||
</route>
|
||||
</routes>
|
8
Laravel/vendor/symfony/routing/Tests/Fixtures/missing_id.xml
vendored
Normal file
8
Laravel/vendor/symfony/routing/Tests/Fixtures/missing_id.xml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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">
|
||||
|
||||
<route path="/test"></route>
|
||||
</routes>
|
8
Laravel/vendor/symfony/routing/Tests/Fixtures/missing_path.xml
vendored
Normal file
8
Laravel/vendor/symfony/routing/Tests/Fixtures/missing_path.xml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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">
|
||||
|
||||
<route id="myroute"></route>
|
||||
</routes>
|
16
Laravel/vendor/symfony/routing/Tests/Fixtures/namespaceprefix.xml
vendored
Normal file
16
Laravel/vendor/symfony/routing/Tests/Fixtures/namespaceprefix.xml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<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">
|
||||
|
||||
<r:route id="blog_show" path="/blog/{slug}" host="{_locale}.example.com">
|
||||
<r:default key="_controller">MyBundle:Blog:show</r:default>
|
||||
<requirement xmlns="http://symfony.com/schema/routing" key="slug">\w+</requirement>
|
||||
<r2:requirement xmlns:r2="http://symfony.com/schema/routing" key="_locale">en|fr|de</r2:requirement>
|
||||
<r:option key="compiler_class">RouteCompiler</r:option>
|
||||
<r:default key="page">
|
||||
<r3:int xmlns:r3="http://symfony.com/schema/routing">1</r3:int>
|
||||
</r:default>
|
||||
</r:route>
|
||||
</r:routes>
|
3
Laravel/vendor/symfony/routing/Tests/Fixtures/nonesense_resource_plus_path.yml
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/nonesense_resource_plus_path.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
blog_show:
|
||||
resource: validpattern.yml
|
||||
path: /test
|
3
Laravel/vendor/symfony/routing/Tests/Fixtures/nonesense_type_without_resource.yml
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/nonesense_type_without_resource.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
blog_show:
|
||||
path: /blog/{slug}
|
||||
type: custom
|
10
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalid.xml
vendored
Normal file
10
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalid.xml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
<!-- </route> -->
|
||||
</routes>
|
1
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalid.yml
vendored
Normal file
1
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalid.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
foo
|
1
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalid2.yml
vendored
Normal file
1
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalid2.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
route: string
|
3
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalidkeys.yml
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalidkeys.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
someroute:
|
||||
resource: path/to/some.yml
|
||||
name_prefix: test_
|
8
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalidnode.xml
vendored
Normal file
8
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalidnode.xml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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">
|
||||
|
||||
<foo>bar</foo>
|
||||
</routes>
|
12
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalidroute.xml
vendored
Normal file
12
Laravel/vendor/symfony/routing/Tests/Fixtures/nonvalidroute.xml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}">
|
||||
<default key="_controller">MyBundle:Blog:show</default>
|
||||
<option key="compiler_class">RouteCompiler</option>
|
||||
<foo key="bar">baz</foo>
|
||||
</route>
|
||||
</routes>
|
12
Laravel/vendor/symfony/routing/Tests/Fixtures/null_values.xml
vendored
Normal file
12
Laravel/vendor/symfony/routing/Tests/Fixtures/null_values.xml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog_show" path="/blog/{slug}">
|
||||
<default key="foo" xsi:nil="true" />
|
||||
<default key="bar" xsi:nil="1" />
|
||||
<default key="foobar" xsi:nil="false">foo</default>
|
||||
<default key="baz" xsi:nil="0">bar</default>
|
||||
</route>
|
||||
</routes>
|
33
Laravel/vendor/symfony/routing/Tests/Fixtures/scalar_defaults.xml
vendored
Normal file
33
Laravel/vendor/symfony/routing/Tests/Fixtures/scalar_defaults.xml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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">
|
||||
|
||||
<route id="blog" path="/blog">
|
||||
<default key="_controller">
|
||||
<string>AcmeBlogBundle:Blog:index</string>
|
||||
</default>
|
||||
<default key="slug" xsi:nil="true" />
|
||||
<default key="published">
|
||||
<bool>true</bool>
|
||||
</default>
|
||||
<default key="page">
|
||||
<int>1</int>
|
||||
</default>
|
||||
<default key="price">
|
||||
<float>3.5</float>
|
||||
</default>
|
||||
<default key="archived">
|
||||
<bool>false</bool>
|
||||
</default>
|
||||
<default key="free">
|
||||
<bool>1</bool>
|
||||
</default>
|
||||
<default key="locked">
|
||||
<bool>0</bool>
|
||||
</default>
|
||||
<default key="foo" xsi:nil="true" />
|
||||
<default key="bar" xsi:nil="1" />
|
||||
</route>
|
||||
</routes>
|
2
Laravel/vendor/symfony/routing/Tests/Fixtures/special_route_name.yml
vendored
Normal file
2
Laravel/vendor/symfony/routing/Tests/Fixtures/special_route_name.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"#$péß^a|":
|
||||
path: "true"
|
18
Laravel/vendor/symfony/routing/Tests/Fixtures/validpattern.php
vendored
Normal file
18
Laravel/vendor/symfony/routing/Tests/Fixtures/validpattern.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
use Symfony\Component\Routing\Route;
|
||||
|
||||
$collection = new RouteCollection();
|
||||
$collection->add('blog_show', new Route(
|
||||
'/blog/{slug}',
|
||||
array('_controller' => 'MyBlogBundle:Blog:show'),
|
||||
array('locale' => '\w+'),
|
||||
array('compiler_class' => 'RouteCompiler'),
|
||||
'{locale}.example.com',
|
||||
array('https'),
|
||||
array('GET', 'POST', 'put', 'OpTiOnS'),
|
||||
'context.getMethod() == "GET"'
|
||||
));
|
||||
|
||||
return $collection;
|
15
Laravel/vendor/symfony/routing/Tests/Fixtures/validpattern.xml
vendored
Normal file
15
Laravel/vendor/symfony/routing/Tests/Fixtures/validpattern.xml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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">
|
||||
|
||||
<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>
|
||||
<requirement key="locale">\w+</requirement>
|
||||
<option key="compiler_class">RouteCompiler</option>
|
||||
<condition>context.getMethod() == "GET"</condition>
|
||||
</route>
|
||||
|
||||
<route id="blog_show_inherited" path="/blog/{slug}" />
|
||||
</routes>
|
13
Laravel/vendor/symfony/routing/Tests/Fixtures/validpattern.yml
vendored
Normal file
13
Laravel/vendor/symfony/routing/Tests/Fixtures/validpattern.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
blog_show:
|
||||
path: /blog/{slug}
|
||||
defaults: { _controller: "MyBundle:Blog:show" }
|
||||
host: "{locale}.example.com"
|
||||
requirements: { 'locale': '\w+' }
|
||||
methods: ['GET','POST','put','OpTiOnS']
|
||||
schemes: ['https']
|
||||
condition: 'context.getMethod() == "GET"'
|
||||
options:
|
||||
compiler_class: RouteCompiler
|
||||
|
||||
blog_show_inherited:
|
||||
path: /blog/{slug}
|
18
Laravel/vendor/symfony/routing/Tests/Fixtures/validresource.php
vendored
Normal file
18
Laravel/vendor/symfony/routing/Tests/Fixtures/validresource.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/** @var $loader \Symfony\Component\Routing\Loader\PhpFileLoader */
|
||||
/** @var \Symfony\Component\Routing\RouteCollection $collection */
|
||||
$collection = $loader->import('validpattern.php');
|
||||
$collection->addDefaults(array(
|
||||
'foo' => 123,
|
||||
));
|
||||
$collection->addRequirements(array(
|
||||
'foo' => '\d+',
|
||||
));
|
||||
$collection->addOptions(array(
|
||||
'foo' => 'bar',
|
||||
));
|
||||
$collection->setCondition('context.getMethod() == "POST"');
|
||||
$collection->addPrefix('/prefix');
|
||||
|
||||
return $collection;
|
13
Laravel/vendor/symfony/routing/Tests/Fixtures/validresource.xml
vendored
Normal file
13
Laravel/vendor/symfony/routing/Tests/Fixtures/validresource.xml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?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">
|
||||
|
||||
<import resource="validpattern.xml" prefix="/{foo}" host="">
|
||||
<default key="foo">123</default>
|
||||
<requirement key="foo">\d+</requirement>
|
||||
<option key="foo">bar</option>
|
||||
<condition>context.getMethod() == "POST"</condition>
|
||||
</import>
|
||||
</routes>
|
8
Laravel/vendor/symfony/routing/Tests/Fixtures/validresource.yml
vendored
Normal file
8
Laravel/vendor/symfony/routing/Tests/Fixtures/validresource.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
_blog:
|
||||
resource: validpattern.yml
|
||||
prefix: /{foo}
|
||||
defaults: { 'foo': '123' }
|
||||
requirements: { 'foo': '\d+' }
|
||||
options: { 'foo': 'bar' }
|
||||
host: ""
|
||||
condition: 'context.getMethod() == "POST"'
|
5
Laravel/vendor/symfony/routing/Tests/Fixtures/with_define_path_variable.php
vendored
Normal file
5
Laravel/vendor/symfony/routing/Tests/Fixtures/with_define_path_variable.php
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$path = '/1/2/3';
|
||||
|
||||
return new \Symfony\Component\Routing\RouteCollection();
|
3
Laravel/vendor/symfony/routing/Tests/Fixtures/withdoctype.xml
vendored
Normal file
3
Laravel/vendor/symfony/routing/Tests/Fixtures/withdoctype.xml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE foo>
|
||||
<foo></foo>
|
Reference in New Issue
Block a user