updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+11 -13
View File
@@ -3,7 +3,7 @@
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2014 Symfony CMF
* (c) 2011-2015 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -15,11 +15,10 @@ use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\Routing\Route as SymfonyRoute;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Psr\Log\LoggerInterface;
/**
* A Generator that uses a RouteProvider rather than a RouteCollection
* A Generator that uses a RouteProvider rather than a RouteCollection.
*
* @author Larry Garfield
*/
@@ -44,13 +43,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
}
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function generate($name, $parameters = array(), $absolute = false)
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
{
if ($name instanceof SymfonyRoute) {
$route = $name;
} elseif (null === $route = $this->provider->getRouteByName($name, $parameters)) {
} elseif (null === $route = $this->provider->getRouteByName($name)) {
throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name));
}
@@ -60,13 +59,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
$debug_message = $this->getRouteDebugMessage($name);
return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $debug_message, $absolute, $hostTokens);
return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $debug_message, $referenceType, $hostTokens);
}
/**
* Support a route object and any string as route name
* Support a route object and any string as route name.
*
* {@inheritDoc}
* {@inheritdoc}
*/
public function supports($name)
{
@@ -74,7 +73,7 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
}
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function getRouteDebugMessage($name, array $parameters = array())
{
@@ -87,14 +86,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
}
if ($name instanceof RouteObjectInterface) {
return 'Route with key ' . $name->getRouteKey();
return 'Route with key '.$name->getRouteKey();
}
if ($name instanceof SymfonyRoute) {
return 'Route with pattern ' . $name->getPattern();
return 'Route with path '.$name->getPath();
}
return get_class($name);
}
}