Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
|
@ -20,8 +20,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||
* The Closure must return a RouteCollection instance.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ClosureLoader extends Loader
|
||||
{
|
||||
|
@ -32,8 +30,6 @@ class ClosureLoader extends Loader
|
|||
* @param string|null $type The resource type
|
||||
*
|
||||
* @return RouteCollection A RouteCollection instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function load($closure, $type = null)
|
||||
{
|
||||
|
@ -42,8 +38,6 @@ class ClosureLoader extends Loader
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||
* The file must return a RouteCollection instance.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class PhpFileLoader extends FileLoader
|
||||
{
|
||||
|
@ -33,8 +31,6 @@ class PhpFileLoader extends FileLoader
|
|||
* @param string|null $type The resource type
|
||||
*
|
||||
* @return RouteCollection A RouteCollection instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function load($file, $type = null)
|
||||
{
|
||||
|
@ -49,8 +45,6 @@ class PhpFileLoader extends FileLoader
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
|
|
|
@ -22,8 +22,6 @@ use Symfony\Component\Config\Util\XmlUtils;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Tobias Schultze <http://tobion.de>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class XmlFileLoader extends FileLoader
|
||||
{
|
||||
|
@ -40,8 +38,6 @@ class XmlFileLoader extends FileLoader
|
|||
*
|
||||
* @throws \InvalidArgumentException When the file cannot be loaded or when the XML cannot be
|
||||
* parsed because it does not validate against the scheme.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function load($file, $type = null)
|
||||
{
|
||||
|
@ -94,8 +90,6 @@ class XmlFileLoader extends FileLoader
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
|
|
14
vendor/symfony/routing/Loader/YamlFileLoader.php
vendored
14
vendor/symfony/routing/Loader/YamlFileLoader.php
vendored
|
@ -23,8 +23,6 @@ use Symfony\Component\Config\Loader\FileLoader;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Tobias Schultze <http://tobion.de>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class YamlFileLoader extends FileLoader
|
||||
{
|
||||
|
@ -42,8 +40,6 @@ class YamlFileLoader extends FileLoader
|
|||
* @return RouteCollection A RouteCollection instance
|
||||
*
|
||||
* @throws \InvalidArgumentException When a route can't be parsed because YAML is invalid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function load($file, $type = null)
|
||||
{
|
||||
|
@ -62,7 +58,7 @@ class YamlFileLoader extends FileLoader
|
|||
}
|
||||
|
||||
try {
|
||||
$config = $this->yamlParser->parse(file_get_contents($path));
|
||||
$parsedConfig = $this->yamlParser->parse(file_get_contents($path));
|
||||
} catch (ParseException $e) {
|
||||
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
|
||||
}
|
||||
|
@ -71,16 +67,16 @@ class YamlFileLoader extends FileLoader
|
|||
$collection->addResource(new FileResource($path));
|
||||
|
||||
// empty file
|
||||
if (null === $config) {
|
||||
if (null === $parsedConfig) {
|
||||
return $collection;
|
||||
}
|
||||
|
||||
// not an array
|
||||
if (!is_array($config)) {
|
||||
if (!is_array($parsedConfig)) {
|
||||
throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path));
|
||||
}
|
||||
|
||||
foreach ($config as $name => $config) {
|
||||
foreach ($parsedConfig as $name => $config) {
|
||||
if (isset($config['pattern'])) {
|
||||
if (isset($config['path'])) {
|
||||
throw new \InvalidArgumentException(sprintf('The file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));
|
||||
|
@ -106,8 +102,6 @@ class YamlFileLoader extends FileLoader
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
|
|
Reference in a new issue