mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-22 11:09:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
12
vendor/symfony/routing/Loader/XmlFileLoader.php
vendored
12
vendor/symfony/routing/Loader/XmlFileLoader.php
vendored
@@ -11,11 +11,11 @@
|
||||
|
||||
namespace Symfony\Component\Routing\Loader;
|
||||
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
use Symfony\Component\Routing\Route;
|
||||
use Symfony\Component\Config\Resource\FileResource;
|
||||
use Symfony\Component\Config\Loader\FileLoader;
|
||||
use Symfony\Component\Config\Resource\FileResource;
|
||||
use Symfony\Component\Config\Util\XmlUtils;
|
||||
use Symfony\Component\Routing\Route;
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
|
||||
/**
|
||||
* XmlFileLoader loads XML routing files.
|
||||
@@ -93,7 +93,7 @@ class XmlFileLoader extends FileLoader
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
return is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'xml' === $type);
|
||||
return \is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'xml' === $type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,11 +166,11 @@ class XmlFileLoader extends FileLoader
|
||||
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must not have both a "prefix" attribute and <prefix> child nodes.', $path));
|
||||
}
|
||||
|
||||
$this->setCurrentDir(dirname($path));
|
||||
$this->setCurrentDir(\dirname($path));
|
||||
|
||||
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file);
|
||||
|
||||
if (!is_array($imported)) {
|
||||
if (!\is_array($imported)) {
|
||||
$imported = array($imported);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user