function GlobFileLoader::load
Same name in this branch
- 11.1.x vendor/symfony/dependency-injection/Loader/GlobFileLoader.php \Symfony\Component\DependencyInjection\Loader\GlobFileLoader::load()
File
-
vendor/
symfony/ routing/ Loader/ GlobFileLoader.php, line 24
Class
- GlobFileLoader
- GlobFileLoader loads files from a glob pattern.
Namespace
Symfony\Component\Routing\LoaderCode
public function load(mixed $resource, ?string $type = null) : mixed {
$collection = new RouteCollection();
foreach ($this->glob($resource, false, $globResource) as $path => $info) {
$collection->addCollection($this->import($path));
}
$collection->addResource($globResource);
return $collection;
}