/usr/share/php/Symfony/Component/DependencyInjection/Loader
NameSizeModeActions
Configurator/-0755rm
schema/-0755rm
ClosureLoader.php11430644editdlrm
DirectoryLoader.php13360644editdlrm
FileLoader.php103270644editdlrm
GlobFileLoader.php8970644editdlrm
IniFileLoader.php32150644editdlrm
PhpFileLoader.php83320644editdlrm
XmlFileLoader.php334140644editdlrm
YamlFileLoader.php409150644editdlrm
Edit: /usr/share/php/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php (1336B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Loader; /** * DirectoryLoader is a recursive loader to go through directories. * * @author Sebastien Lavoie */ class DirectoryLoader extends FileLoader { /** * {@inheritdoc} */ public function load($file, string $type = null) { $file = rtrim($file, '/'); $path = $this->locator->locate($file); $this->container->fileExists($path, false); foreach (scandir($path) as $dir) { if ('.' !== $dir[0]) { if (is_dir($path.'/'.$dir)) { $dir .= '/'; // append / to allow recursion } $this->setCurrentDir($path); $this->import($dir, null, false, $path); } } return null; } /** * {@inheritdoc} */ public function supports($resource, string $type = null) { if ('directory' === $type) { return true; } return null === $type && \is_string($resource) && str_ends_with($resource, '/'); } }