X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar-X/vendor/symfony/routing/Loader
home
/
gfecatvj
/
sites
/
realesbar-X
/
vendor
/
symfony
/
routing
/
Loader
/
📁
..
📄
AnnotationClassLoader.php
(11.44 KB)
📄
AnnotationDirectoryLoader.php
(2.77 KB)
📄
AnnotationFileLoader.php
(4.25 KB)
📄
ClosureLoader.php
(1.05 KB)
📁
Configurator
📄
ContainerLoader.php
(938 B)
📄
DirectoryLoader.php
(1.48 KB)
📄
GlobFileLoader.php
(1.03 KB)
📄
ObjectLoader.php
(2.92 KB)
📄
PhpFileLoader.php
(2.27 KB)
📄
XmlFileLoader.php
(15.84 KB)
📄
YamlFileLoader.php
(10.49 KB)
📁
schema
Editing: DirectoryLoader.php
<?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\Loader; use Symfony\Component\Config\Loader\FileLoader; use Symfony\Component\Config\Resource\DirectoryResource; use Symfony\Component\Routing\RouteCollection; class DirectoryLoader extends FileLoader { /** * {@inheritdoc} */ public function load($file, string $type = null) { $path = $this->locator->locate($file); $collection = new RouteCollection(); $collection->addResource(new DirectoryResource($path)); foreach (scandir($path) as $dir) { if ('.' !== $dir[0]) { $this->setCurrentDir($path); $subPath = $path.'/'.$dir; $subType = null; if (is_dir($subPath)) { $subPath .= '/'; $subType = 'directory'; } $subCollection = $this->import($subPath, $subType, false, $path); $collection->addCollection($subCollection); } } return $collection; } /** * {@inheritdoc} */ public function supports($resource, string $type = null) { // only when type is forced to directory, not to conflict with AnnotationLoader return 'directory' === $type; } }
Upload File
Create Folder